emojis in webgadget showing without colors

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

emojis in webgadget showing without colors

Post by ricardo »

Hi,

Following this:

https://www.w3schools.com/charsets/ref_emoji.asp

If i put the code inside a string

HTML$ = "about:<span style='font-size:100px;'>&#129409;</span><p>i will display &#129409;</p><p>i will display &#x1F981;</p>"

and the load it in the webgadget, the emoji shows in black and white, no colors.

Anybody can help?

I need to load fro a string becuse im polanning to create the html with my code, im not trying to load the w3school.com pge

Thanks in advance
ARGENTINA WORLD CHAMPION
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: emojis in webgadget showing without colors

Post by IdeasVacuum »

Hi ricardo

...the emojis are displayed in black and white on the w3schools site too when viewed on my PC - they are font based and so they won't be shown in colour unless the host (your PC) already has a colour version of the font installed.

See: http://classic.getemoji.com

Edit: Different platforms, different results: https://emojipedia.org/smiling-face-with-smiling-eyes
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: emojis in webgadget showing without colors

Post by firace »

Works here:

Code: Select all

OpenWindow(1, 0, 0, 822, 450, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu )

coloremoji$ = "<body><center><font style='font-family:segoe ui emoji;font-size:188pt'>&#129409</font></body>"

WebGadget (10, 0, 0, 822, 450, "about:" + coloremoji$) 

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow  
The key is using the "Segoe UI Emoji" font (part of a default Windows 10 installation - not sure about earlier versions).
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: emojis in webgadget showing without colors

Post by IdeasVacuum »

If consistency is required, you either have to deliver the coloured font with your program or use images instead.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: emojis in webgadget showing without colors

Post by ricardo »

IdeasVacuum wrote: See: http://classic.getemoji.com
Anybody see this in black and white??
ARGENTINA WORLD CHAMPION
ricardo
Addict
Addict
Posts: 2402
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: emojis in webgadget showing without colors

Post by ricardo »

firace wrote:Works here:

Code: Select all

OpenWindow(1, 0, 0, 822, 450, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu )

coloremoji$ = "<body><center><font style='font-family:segoe ui emoji;font-size:188pt'>&#129409</font></body>"

WebGadget (10, 0, 0, 822, 450, "about:" + coloremoji$) 

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow  
The key is using the "Segoe UI Emoji" font (part of a default Windows 10 installation - not sure about earlier versions).
Great!! Thanks !!
ARGENTINA WORLD CHAMPION
Post Reply