Displaying coloured OTF fonts
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Displaying coloured OTF fonts
I downloaded a free coloured OTF font onto my MacOS 15 machine and could NOT get it to display anywhere properly . . .
https://www.fontspace.com/peeka-boo-font-f89950
In ancient Ethiopic manuscripts (among many other places) obviously bored scribes started getting funky and doing stuff like this:
- -
Sorry: not easy to see: but, basically this is a punctuation mark that is coloured:
- -
Here's my impression of the same sort of thing.
It would be quite possible to make a coloured OTF font with these coloured glyphs, but as far as I can see if one is used inside a field it does NOT show up.
"OpenType SVG is supported in some recent apps, including Adobe Photoshop 2017, Illustrator 2017, Mozilla Firefox"
https://gitlab.gnome.org/GNOME/gimp/-/issues/10937
https://www.fontspace.com/peeka-boo-font-f89950
In ancient Ethiopic manuscripts (among many other places) obviously bored scribes started getting funky and doing stuff like this:
- -
Sorry: not easy to see: but, basically this is a punctuation mark that is coloured:
- -
Here's my impression of the same sort of thing.
It would be quite possible to make a coloured OTF font with these coloured glyphs, but as far as I can see if one is used inside a field it does NOT show up.
"OpenType SVG is supported in some recent apps, including Adobe Photoshop 2017, Illustrator 2017, Mozilla Firefox"
https://gitlab.gnome.org/GNOME/gimp/-/issues/10937
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
It should be possible. What OS/OXT version are you running it on?richmond62 wrote: ↑Tue Oct 15, 2024 12:22 pm Here's my impression of the same sort of thing.
It would be quite possible to make a coloured OTF font with these coloured glyphs, but as far as I can see if one is used inside a field it does NOT show up.
"OpenType SVG is supported in some recent apps, including Adobe Photoshop 2017, Illustrator 2017, Mozilla Firefox"
https://gitlab.gnome.org/GNOME/gimp/-/issues/10937
OTF Color fonts didn't become standardized until 2016. There wound up being different color file formats that had been develop in the meantime, so there's apparently scattered support for vaious different color font formats. Personally, I doubt there will ever even be wide adoption of color fonts, beyond emojis, but I could be wrong, it has only been standardized under 10 years.
https://www.colorfonts.wtf
Colored OTF fonts, such as Apple's Emoji font and Ubuntu's Color Emoji Fonts, can actually be made of bitmapped pixel images for the glyphs (up to 256px maximum size), those work in a text field just fine for me on macOS, in fact you can even have them as your stack file name as I have one called " .stack". Bitmapped OTF Color SVG Fonts can work (SVG supports having images embedded in them) should work.
Here's some commercial pixel based color OTF font examples:
https://handmadefont.com/shop/color-explode-font/
https://creativemarket.com/mr.ramon/634 ... font-Fargo
There's also colored SVG Fonts that are actually vector based. I don't think I've ever tried one of those in the IDE.
The engine uses Freetype and Pango libraries to do font stuff.
https://gitlab.gnome.org/GNOME/pango/-/issues/435
Just found this tid-bit:
"FreeType 2.10 supports Segoe UI Emoji and similar fonts (that use CPAL format), v2.9.1 does not.
Not sure which version v9.6.3 engines were compiled with.
- tperry2x
- Posts: 2475
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Displaying coloured OTF fonts
If I was doing it, I'd probably fake the appearance of it - with a multicoloured PNG.
I'd set the character of it to the imagesource, like I do in the about stack (gearwheel icon) in the engine number field:
I'd set the character of it to the imagesource, like I do in the about stack (gearwheel icon) in the engine number field:
Code: Select all
set the imagesource of char 1 of line 1 of field "enginefield" to 205303
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
That would not allow one to export HTML, RTF, or PDF documents properly.
https://richmondmathewson.owlstown.net/
- tperry2x
- Posts: 2475
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Displaying coloured OTF fonts
Don't know about HTML or RTF, but certainly PDF seems to work well using that methodrichmond62 wrote: ↑Wed Oct 16, 2024 1:10 pm That would not allow one to export HTML, RTF, or PDF documents properly.
- Attachments
-
- output.pdf
- (29.78 KiB) Downloaded 27 times
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
Ah, Yes, PDF export will work as it can embed pictorial elements.
Ideally . . . OXT should handle Coloured OTF fonts in juts the same way as it deals with TTF and black-and-white OTF fonts, and export them as such so that they show up in the same way in HTML and RTF documents as long as the fonts are either on a user's machine or set up as WOFF web-fonts for a browser.
Ideally . . . OXT should handle Coloured OTF fonts in juts the same way as it deals with TTF and black-and-white OTF fonts, and export them as such so that they show up in the same way in HTML and RTF documents as long as the fonts are either on a user's machine or set up as WOFF web-fonts for a browser.
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
Gotta run but did a quick test of color font in a text fld, using this freeware font:
https://www.fontspace.com/multicolore-pro-font-f49758 Could you guys test with that font on other platforms?
I opened that font in the FontForge version I have installed, it opens, but it displays the glyphs as black-only filled character shapes.
https://www.fontspace.com/multicolore-pro-font-f49758 Could you guys test with that font on other platforms?
I opened that font in the FontForge version I have installed, it opens, but it displays the glyphs as black-only filled character shapes.
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
Fontforge cannot cope with coloured fonts.I opened that font in the FontForge version I have installed
The commercial Fontlab 7 can . . . (your morality may vary).
https://richmondmathewson.owlstown.net/
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
Yes, this font works here:
OXT Lite 1.08
MacOS 12.7
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
OK so that confirms at least that particular format of OTF SVG Color Fonts (of the vector-glyph kind) seem to work OK on macOS (at least on 10.14+, earlier versions not tested).
I'll have to check PDF output that uses that font to see if it stays as a Font specification, rather than rasterizing it to an embedded image. When you use an image reference for 'imageSource' of a character the PDF includes the image to-size and the rest of the text stays as text, for which you need the correct font embedded into the PDF or installed on the system. It also keeps button labels as text.
I have some PDF pro-editing tools available to me so I can see exactly how the output PDF is constructed: Images get resampled in PDF output, in my experience images are usually in the PDF output at either 72 (which is the case with the imageSource here),144dpi, or 288dpi (Apple 'Retina' displays). 288dpi is 4x 72dpi traditional monitor resolution and just under 300dpi which has long been used as the gold-standard for high-resolution color images in commercial printing, so that would be my preferred resolution in output.
By the way, I'm on a machine running the latest macOS 15.0.1 (can't test OXT here though), I just noticed there's system-wide 'auto-complete' that's a kind of great feature to have!
I'll have to check PDF output that uses that font to see if it stays as a Font specification, rather than rasterizing it to an embedded image. When you use an image reference for 'imageSource' of a character the PDF includes the image to-size and the rest of the text stays as text, for which you need the correct font embedded into the PDF or installed on the system. It also keeps button labels as text.
I have some PDF pro-editing tools available to me so I can see exactly how the output PDF is constructed: Images get resampled in PDF output, in my experience images are usually in the PDF output at either 72 (which is the case with the imageSource here),144dpi, or 288dpi (Apple 'Retina' displays). 288dpi is 4x 72dpi traditional monitor resolution and just under 300dpi which has long been used as the gold-standard for high-resolution color images in commercial printing, so that would be my preferred resolution in output.
By the way, I'm on a machine running the latest macOS 15.0.1 (can't test OXT here though), I just noticed there's system-wide 'auto-complete' that's a kind of great feature to have!
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
Hmm, I have found mention of some work done on certain Type 3 varieties of layered-filled vector editing support for Fontforge,, but obviously that's not ready for prime-time, though you can't beat the price. It does appear that most of the software that supports creating Color SVG OTF Fonts are of the commercial variety.richmond62 wrote: ↑Wed Oct 16, 2024 6:17 pmFontforge cannot cope with coloured fonts.I opened that font in the FontForge version I have installed
The commercial Fontlab 7 can . . . (your morality may vary).
'Birdfont' might be an option:
https://birdfont.org/download.php
Scratch that, it looks like the free version doesn't support Color Fonts.
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
Just to test things out a bit further, I did '"Print Card" on that color font test stack, then opened it in vector art editor.
Strange but good result, it created a 288dpi image of the colored text in the feild, HOWEVER there was ALSO a copy of the art behind that image (inside the same a mask rect path) that retained the color vector paths of the color font.
The vector version is resolution independent, not to mention completely editable (and easily 'trap'able if you're into that prepress kind of thing) so it would be far better if the 288dpi pxel image version of the colored text was not there, or at least not on a layer above the vector art completely obstructing it. But either version should be fine for most people's uses, and at least we know the vector path of glyphs are retained if we want to edit them later.
Strange but good result, it created a 288dpi image of the colored text in the feild, HOWEVER there was ALSO a copy of the art behind that image (inside the same a mask rect path) that retained the color vector paths of the color font.
The vector version is resolution independent, not to mention completely editable (and easily 'trap'able if you're into that prepress kind of thing) so it would be far better if the 288dpi pxel image version of the colored text was not there, or at least not on a layer above the vector art completely obstructing it. But either version should be fine for most people's uses, and at least we know the vector path of glyphs are retained if we want to edit them later.
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
This is probably going to leave me with yellow legs: but as my legs are already almost dark green, what the hell?
http://web.archive.org/web/201412232244 ... lor-emoji/
"Hot Damn!" 'tis the wayback machine, and there ain't no way . . .
I wonder if anyone happens to have any sort of link to this?
Umm: possssssibly:
https://github.com/joypixels/emojione/issues/477
- - -
https://youtu.be/jQvUBf5l7Vw
http://web.archive.org/web/201412232244 ... lor-emoji/
- -A tool called emoji_builder.py, to embed a set of PNG images into an existing fonts
"Hot Damn!" 'tis the wayback machine, and there ain't no way . . .
I wonder if anyone happens to have any sort of link to this?
Umm: possssssibly:
https://github.com/joypixels/emojione/issues/477
- - -
https://youtu.be/jQvUBf5l7Vw
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
https://github.com/behdad/color-emoji/b ... builder.pyrichmond62 wrote: ↑Thu Oct 17, 2024 9:59 am A tool called emoji_builder.py, to embed a set of PNG images into an existing fonts
I wonder if anyone happens to have any sort of link to this?
If you're OK with a GUI-less tools then there's a few out there from various sources that can do different things with OTF Fonts.
Like the one linked from that page, you linked too.
https://github.com/MitchTalmadge/Emoji- ... s/tag/1.91
Or this one:
https://github.com/behdad/color-emoji
Which has a rather informative page here:
https://rawgit.com/behdad/color-emoji/m ... on/v1.html
For a nice vector font editor with color SVG / Image glyph support, all I'd been finding were commercial offerings.
I'm somewhat surprised that FontForge doesn't support that already.
This seems to indicate FontForge does support some color fills in 'multi-layer' glyphs:
https://fontforge.org/docs/ui/dialogs/m ... nfo-dialog.
Here's a dev tool with a GUI from MicroSoft:
https://apps.microsoft.com/detail/9nj7k ... n-gb&gl=gb
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
Here's an awesome JS library that can extract the vectors from glyphs of font:
https://opentype.js.org
https://github.com/opentypejs/opentype.js
It's written in Javascript, but we can use it when xTalk scripting on the web or with some other JS engine, like the one accessible with the Browser widget. Opentype.js supports color fonts too.
Adobe's Font Dev Kit (Apache 2.0 License) thing looks like it has some useful command-line tools as well:
https://adobe-type-tools.github.io/afdk ... rview.html
https://github.com/adobe-type-tools/afdko
https://opentype.js.org
https://github.com/opentypejs/opentype.js
It's written in Javascript, but we can use it when xTalk scripting on the web or with some other JS engine, like the one accessible with the Browser widget. Opentype.js supports color fonts too.
Adobe's Font Dev Kit (Apache 2.0 License) thing looks like it has some useful command-line tools as well:
https://adobe-type-tools.github.io/afdk ... rview.html
https://github.com/adobe-type-tools/afdko
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
Supposedly:
https://birdfont.org/
Deceptive advertising!
https://birdfont.org/
BUT, when you go and look you find that support for coloured fonts is only available in a commercial version.Birdfont is a free font editor which lets you create vector graphics and export TTF, OTF and SVG fonts. The editor has good support for both monochrome and color font formats.
Deceptive advertising!
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
Yeah I thought so too, that's why I didn't mention that one.richmond62 wrote: ↑Fri Oct 18, 2024 5:57 pm Supposedly:
https://birdfont.org/
BUT, when you go and look you find that support for coloured fonts is only available in a commercial version.Birdfont is a free font editor which lets you create vector graphics and export TTF, OTF and SVG fonts. The editor has good support for both monochrome and color font formats.
Deceptive advertising!
- richmond62
- Posts: 3896
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
Re: Displaying coloured OTF fonts
I am not sure quite what this means:
https://github.com/fontforge/fontforge/issues/677FontForge can already make multilayered/multicolored fonts; Type3 and SVG fonts
https://richmondmathewson.owlstown.net/
- OpenXTalkPaul
- Posts: 2266
- Joined: Sat Sep 11, 2021 4:19 pm
- Contact:
Re: Displaying coloured OTF fonts
I think 'Type 3 ' OTF fonts can have color, gradient or pattern fills assigned to glyphs.richmond62 wrote: ↑Sat Oct 19, 2024 12:14 pm I am not sure quite what this means:
https://github.com/fontforge/fontforge/issues/677FontForge can already make multilayered/multicolored fonts; Type3 and SVG fonts
From what I've gathered from reading up on this whole Color Fonts thing is that even though a standard was settled on in 2016 support for various color font formats is still spotty, with some color Fonts that only work in color for certain apps (like Adobe apps), while others work fine in all apps (at least they work on newer OSes).
Who is online
Users browsing this forum: No registered users and 1 guest