Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can an emoji be displayed?
#8
(04-21-2024, 03:04 PM)grymmjack Wrote: 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).
Yeah. I too am not sure if printing emojis to the terminal will work with QB64's PRINT. I'll need to play with that.

However, printing to a graphics screen with _UPRINTSTRING should work. Note that we do not have color font support yet. So, the below will print in monochrome (you can pick a single color of your choice).

Code: (Select All)
SCREEN_NEWIMAGE(800, 600, 32)

DIM fnt AS LONG: fnt = _LOADFONT("Seguiemj.ttf", 22)

COLOR _RGB32(255, 0, 255)

_UPRINTSTRING (100, 100), MKL$(&H1F638&), , 32, fnt

[Image: Screenshot-2024-04-21-235755.png]

Update:

Added sample font with emojis.


Attached Files
.zip   NotoColorEmoji-Regular.zip (Size: 7.39 MB / Downloads: 14)
Reply


Messages In This Thread
How can an emoji be displayed? - by PhilOfPerth - 04-21-2024, 01:18 AM
RE: How can an emoji be displayed? - by SMcNeill - 04-21-2024, 06:34 AM
RE: How can an emoji be displayed? - by SMcNeill - 04-21-2024, 06:41 AM
RE: How can an emoji be displayed? - by grymmjack - 04-21-2024, 03:04 PM
RE: How can an emoji be displayed? - by a740g - 04-21-2024, 06:28 PM
RE: How can an emoji be displayed? - by bplus - 04-21-2024, 06:47 PM



Users browsing this thread: 2 Guest(s)