Emojis in TextGadget don't accept colours

Linux specific forum
User avatar
marcoagpinto
Addict
Addict
Posts: 947
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Emojis in TextGadget don't accept colours

Post 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
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: [PB5.70] Emojis in TextGadget don't accept colours

Post 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
User avatar
marcoagpinto
Addict
Addict
Posts: 947
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB5.70] Emojis in TextGadget don't accept colours

Post 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.
Fred
Administrator
Administrator
Posts: 16687
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [PB5.70] Emojis in TextGadget don't accept colours

Post 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.
Post Reply