Page 1 of 1
Emojis in TextGadget don't accept colours
Posted: Fri Mar 22, 2019 10:38 am
by marcoagpinto
In Ubuntu 16.04 the emoji would become red.
But, on Ubuntu 18.04 it remains black:
Code: Select all
TextGadget(#TEXT_MISSING_CODES,x,y,100-40+10+10+10+10-20-10-6,16,"Missing FLAG_EMOJI_HERE_FORUM_GAVE_ERROR ")
SetGadgetColor(#TEXT_MISSING_CODES,#PB_Gadget_FrontColor,#Red)
EDIT: Copy the flag emoji from:
https://pastebin.com/1vBeQZnc
Re: [PB5.70] Emojis in TextGadget don't accept colours
Posted: Fri Mar 22, 2019 11:38 am
by #NULL
<FLAG> Chequered Flag
A flag with black and white squares shown in a checkerboard pattern, used to signal the start or end of a motor car race.
Are you sure this symbol supports coloring? Just because its red in Ubuntu 16.04 doesn't mean that's right.
Here is a test code (change font and insert flag):
Code: Select all
win = OpenWindow(#PB_Any, 50,100, 800, 600, "..")
AddKeyboardShortcut(win, #PB_Shortcut_Escape, 10)
#TEXT_MISSING_CODES = 0
TextGadget(#TEXT_MISSING_CODES,x,y,100-40+10+10+10+10-20-10-6,16,"Missing <FLAG> FLAG_EMOJI_HERE_FORUM_GAVE_ERROR ")
font = LoadFont(#PB_Any, "monospace", 12)
SetGadgetFont(#TEXT_MISSING_CODES, FontID(font))
SetGadgetColor(#TEXT_MISSING_CODES,#PB_Gadget_FrontColor,#Red)
Repeat
WaitWindowEvent()
Until Event() = #PB_Event_CloseWindow Or Event() = #PB_Event_Menu
Re: [PB5.70] Emojis in TextGadget don't accept colours
Posted: Sat Mar 23, 2019 12:37 am
by marcoagpinto
#NULL wrote:
<FLAG> Chequered Flag
A flag with black and white squares shown in a checkerboard pattern, used to signal the start or end of a motor car race.
Are you sure this symbol supports coloring? Just because its red in Ubuntu 16.04 doesn't mean that's right.
Here is a test code (change font and insert flag):
Code: Select all
win = OpenWindow(#PB_Any, 50,100, 800, 600, "..")
AddKeyboardShortcut(win, #PB_Shortcut_Escape, 10)
#TEXT_MISSING_CODES = 0
TextGadget(#TEXT_MISSING_CODES,x,y,100-40+10+10+10+10-20-10-6,16,"Missing <FLAG> FLAG_EMOJI_HERE_FORUM_GAVE_ERROR ")
font = LoadFont(#PB_Any, "monospace", 12)
SetGadgetFont(#TEXT_MISSING_CODES, FontID(font))
SetGadgetColor(#TEXT_MISSING_CODES,#PB_Gadget_FrontColor,#Red)
Repeat
WaitWindowEvent()
Until Event() = #PB_Event_CloseWindow Or Event() = #PB_Event_Menu
I am off for the weekend, so I will only be able to test it on Ubuntu next week (on the other computer with the VMs).
However, it is red in Windows 10.
Re: [PB5.70] Emojis in TextGadget don't accept colours
Posted: Sun Jul 02, 2023 9:29 am
by Fred
It seems like the flag got real color in Ubuntu 18.04+ (no more monchrome), so that's why it's no more colored by the font color.