Posts: 720
Threads: 111
Joined: Apr 2022
Reputation:
28
I would like to use an "emoji" (or similar) in my programme. Is there a (simple) way to do this? I don't see any appropriate symbols in the ASCII code.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.)

Please visit my Website at:
http://oldendayskids.blogspot.com/
Posts: 720
Threads: 111
Joined: Apr 2022
Reputation:
28
04-21-2024, 03:39 AM
(This post was last modified: 04-21-2024, 03:45 AM by PhilOfPerth.)
Thanks Terry.
I found what I wanted in Wingding (a font I never expected to use).
I found I can change fonts mid-stream, but the new font seems to place the print position as 1,1.
I can fix this by using Locate r,c but wondered if there's a setting when using the new font that bypasses this?
Also, I only want to use one character, then revert to my old font. Is there a shorter way than re-re-setting my font?
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.)

Please visit my Website at:
http://oldendayskids.blogspot.com/
Posts: 2,989
Threads: 352
Joined: Apr 2022
Reputation:
284
For a quick print of a single character, like your emoji, just use the above with a little helper code:
SUB PrintSmiley
f& = _FONT 'get the current font so we can restore it.
SafeLoadFont <whatever the handle is for the wingding font you loaded earlier in your code>
Print Chr$(<whatever the value is for the character>);
SafeLoadFont f& 'restore the current font back.
END SUB
Posts: 720
Threads: 111
Joined: Apr 2022
Reputation:
28
Thanks Steve.
I'll have a fiddle with that;
I don't really see much difference between that and just re-declaring my original font though.
Maybe the difference will become more obvious when I use it.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.)

Please visit my Website at:
http://oldendayskids.blogspot.com/
Posts: 453
Threads: 22
Joined: Nov 2022
Reputation:
51
Since we display unicode we should be able to display emojis? I know that we should be able to do this in terminals that support UTF-8. Just print out the unicode code point code to the terminal and it will display the emoji configured in the system? Or is this wrong?
Is it that when using a graphics screen mode the emojis will not render properly?
TBH I haven't tried to render an emoji in terminal yet. (the terminal must support it - windows terminal, xterm, mac terminal, etc. all do).