ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Delphi / Windows 7 / ColorFonts like Emoji

(1/3) > >>

KodeZwerg:
Hi there,
i could need some coding advice for this problem:
I would like to program an Application that also shows Emoji like used on this Web-Site or WhatsApps or or or, hopefully you know what i mean.

My Problem is native those Fonts are supported by Windows 8.1 or higher (Segoe UI Emoji).
Example: 😱 🤡 👨 👩 🙈 🙉 🙊 🌈 💘 💖 🔞 🇩🇪 👍 🤘

All Windows 8.1+ will display proper Emoji while Windows 7 shows empty rectangle.
If you use Firefox, those Emojis will be rendered on any Machine.

So my question is: How does FireFox render a Font while Delphi cant (or Browsers Opera/IE)

Quick'n'Dirty i solved this by implementing proper Bitmaps, my Goal would be using Unicode ColorFonts.

ConstanceJill:
So my question is: How does FireFox render a Font while Delphi cant (or Browsers Opera/IE)-KodeZwerg (June 20, 2018, 05:57 AM)
--- End quote ---
That would be because webpages can provide the font by hosting it somewhere and giving the path to download it from via .css : see https://www.w3schools.com/cssref/css3_pr_font-face_rule.asp

Now there probably is a way to embed the font in your application too, as I remember there was a way to do it for graphic modes with Turbo Pascal back then.

MilesAhead:
So my question is: How does FireFox render a Font while Delphi cant (or Browsers Opera/IE)-KodeZwerg (June 20, 2018, 05:57 AM)
--- End quote ---
That would be because webpages can provide the font by hosting it somewhere and giving the path to download it from via .css : see https://www.w3schools.com/cssref/css3_pr_font-face_rule.asp

Now there probably is a way to embed the font in your application too, as I remember there was a way to do it for graphic modes with Turbo Pascal back then.
-ConstanceJill (June 20, 2018, 06:31 AM)
--- End quote ---

I stopped coding with Delphi at version 5 Pro.  But I think it must still be possible to create a "resource only" DLL with fonts,bitmaps,strings etc. and load it when the program runs.  The OP may have to check with the font maker if it is OK to redistribute the fonts in a DLL with the program.

KodeZwerg:
Sorry if i spelled question wrong.

I have already the Font. I am able to attach to that Font. I can show Text with that Font. What doesnt function yet is the part when i try show ColorFonts (like a smiley: yellow skin, white eyes, red lips, black outline).

When i try dispay such it end up with empty space or in bad cases with a transparent rectangle with black border.
After reading MSDN i know that its restricted to Windows 8.1 or higher.

My .exe will work on Windows 8.1, display everything like expected (Direct2d/Win2d used to do it), Windows 7 = white space
What makes me wuzzy is that FireFox can display and i am not able to do, equal how tricky i try.

I am pretty sure i can apopt Code from non-Delphi, i just mentioned it cause i use it  :-* so if someone has an Idea, please feed me  :D

wraith808:
Sorry if i spelled question wrong.

I have already the Font. I am able to attach to that Font. I can show Text with that Font. What doesnt function yet is the part when i try show ColorFonts (like a smiley: yellow skin, white eyes, red lips, black outline).

When i try dispay such it end up with empty space or in bad cases with a transparent rectangle with black border.
After reading MSDN i know that its restricted to Windows 8.1 or higher.

My .exe will work on Windows 8.1, display everything like expected (Direct2d/Win2d used to do it), Windows 7 = white space
What makes me wuzzy is that FireFox can display and i am not able to do, equal how tricky i try.

I am pretty sure i can apopt Code from non-Delphi, i just mentioned it cause i use it  :-* so if someone has an Idea, please feed me  :D
-KodeZwerg (June 20, 2018, 11:37 AM)
--- End quote ---

Does Delphi show the font in the list of fonts in the property editor?

Navigation

[0] Message Index

[#] Next page

Go to full version