OTF Variable fonts
Andrea T.
Posts: 41
Hello everybody,
I'm looking for resources that can teach me how to build an OTF variable font. I'm using Glyphs and I have already created a TTF GX variable typeface.
I'm looking for resources that can teach me how to build an OTF variable font. I'm using Glyphs and I have already created a TTF GX variable typeface.
Recently a client asked me for an OTF format that still behaves as a variable but I don't know how to do it. I have found a lot of articles about VF and about OTF (some of them thanks to this site) but nothing on how to practically create it: which software or plug in...Am I missing something?
Thank you in advance for any information you can provide.
0
Comments
-
Any reason why they asked for the OTF format?0
-
Please be aware a variable font with an OTF file extension can contain either TrueType outlines or PostScript-style outlines.It seems you want to make a variable font with PostScript-style outlines, so it must contain a CFF2 font table. Currently afdko allows you to generate such font. Font editors that make use of it, can probably be used.0
-
Sorry, didn't ask. Actually I didn't know they exist before that request. I always used TTF GX export of Glyphs without any problem and I thought it was the only format available. Does exist a plug in that allows you to create such format?Georg Seifert said:Any reason why they asked for the OTF format?0 -
Glyphs doesn’t support CFF2 variable fonts, yet. We are working on it.1
-
thank you.Georg Seifert said:Glyphs doesn’t support CFF2 variable fonts, yet. We are working on it.
and thank you too!Erwin Denissen said:Please be aware a variable font with an OTF file extension can contain either TrueType outlines or PostScript-style outlines.It seems you want to make a variable font with PostScript-style outlines, so it must contain a CFF2 font table. Currently afdko allows you to generate such font. Font editors that make use of it, can probably be used.0 -
-
One concern to note is that Variable OTFs struggle with hinting overlapping contours. So if you need to preserve overlaps, generating a variable TTF is the better bet right now—at least if you intend to add hinting.1
-
I have noticed that some similar issue still happens with TTF as well, you see a "shadow" of the overlapping contours when I try them on a browser or on text editing software. So I usually merge all contours just before the export.Aaron Bell said:One concern to note is that Variable OTFs struggle with hinting overlapping contours. So if you need to preserve overlaps, generating a variable TTF is the better bet right now—at least if you intend to add hinting.0 -
Indeed. It seems worth wondering why the client wants this. If they are asking it because they think that OTF means "has layout tables"/"more advanced"/whatever, then I would consider simply changing the file extension.Erwin Denissen said:Please be aware a variable font with an OTF file extension can contain either TrueType outlines or PostScript-style outlines.
It's hard to imagine that a client really genuinely prefers to have CFF2 outlines, when surely the whole point of OpenType is that we don't have to care about the choice of outlines.2 -
I think it depends on the renderer being used. Any Microsoft renderer is based on the bilevel renderer, such as 4×4 oversampling, and stacking the same outline multiple times will still be the same render. On the other hand, the FreeType anti-aliasing method cannot handle self-intersection properly (it counts the overlap as more area being taken and therefore assumes the pixel is more filled) and causes glitches like this.Andrea T. said:
I have noticed that some similar issue still happens with TTF as well, you see a "shadow" of the overlapping contours when I try them on a browser or on text editing software. So I usually merge all contours just before the export.Aaron Bell said:One concern to note is that Variable OTFs struggle with hinting overlapping contours. So if you need to preserve overlaps, generating a variable TTF is the better bet right now—at least if you intend to add hinting.
1 -
Andrea T. said:I'm using Glyphs and I have already created a TTF GX variable typeface.
If you refer to GX, that sounds like you have made a variable font that doesn't conform to the OT 1.8.x spec for variable fonts. E.g., you've defined axes differently than spec'd in OT. Is that what you mean?
If you meant a variable font with TT outlines, then I suggest you say that, or perhaps a (glyf/)gvar variable font. (At this point, I'm guessing most people would take OT as implied.)0 -
'TTF GX' is how Glyphs identified their initial variable font export option, and they still use [GX] as an icon image for that (beta) export option, so it is a little confusing.0
-
This issue is being resolved in the upcoming FreeType 2.10.3, though it requires that the OVERLAP_SIMPLE and OVERLAP_COMPOUND flags are set for the specific glyphs (which most variable ttf fonts probably don't have set). You can see our discussion about this issue on the Cascadia Code github.Piotr Grochowski said:
I think it depends on the renderer being used. Any Microsoft renderer is based on the bilevel renderer, such as 4×4 oversampling, and stacking the same outline multiple times will still be the same render. On the other hand, the FreeType anti-aliasing method cannot handle self-intersection properly (it counts the overlap as more area being taken and therefore assumes the pixel is more filled) and causes glitches like this.Andrea T. said:
I have noticed that some similar issue still happens with TTF as well, you see a "shadow" of the overlapping contours when I try them on a browser or on text editing software. So I usually merge all contours just before the export.Aaron Bell said:One concern to note is that Variable OTFs struggle with hinting overlapping contours. So if you need to preserve overlaps, generating a variable TTF is the better bet right now—at least if you intend to add hinting.
I ended up adding a brute force override to implement those two flags on all glyphs of Cascadia Code (rather than just the ones that needed it) as a stopgap until ufo2ft decides how they'd like to implement it.
2 -
Aaron Bell said:
This issue is being resolved in the upcoming FreeType 2.10.3, though it requires that the OVERLAP_SIMPLE and OVERLAP_COMPOUND flags are set for the specific glyphs (which most variable ttf fonts probably don't have set). You can see our discussion about this issue on the Cascadia Code github.Piotr Grochowski said:
I think it depends on the renderer being used. Any Microsoft renderer is based on the bilevel renderer, such as 4×4 oversampling, and stacking the same outline multiple times will still be the same render. On the other hand, the FreeType anti-aliasing method cannot handle self-intersection properly (it counts the overlap as more area being taken and therefore assumes the pixel is more filled) and causes glitches like this.Andrea T. said:
I have noticed that some similar issue still happens with TTF as well, you see a "shadow" of the overlapping contours when I try them on a browser or on text editing software. So I usually merge all contours just before the export.Aaron Bell said:One concern to note is that Variable OTFs struggle with hinting overlapping contours. So if you need to preserve overlaps, generating a variable TTF is the better bet right now—at least if you intend to add hinting.
I ended up adding a brute force override to implement those two flags on all glyphs of Cascadia Code (rather than just the ones that needed it) as a stopgap until ufo2ft decides how they'd like to implement it.
I prefer the rendering of 4×4 oversampling anyway. Because it is pretty much the same render process as standard bilevel rendering, and it is not sensitive to every single area in the pixel. It is pretty much a more practical anti-aliasing engine. So even with this update my font renderer named TD renderer will of course still use 4×4 oversampling, like classic GDI does.
0 -
This is technically true, but in over 20 years of OpenType work, the only OTFs I have encountered with TrueType outlines were one or two specifically created to test software assumptions. I have never seen or even heard of one that was in normal use or encountered “in the wild.”Erwin Denissen said:Please be aware a variable font with an OTF file extension can contain either TrueType outlines or PostScript-style outlines.
So, on the one hand: yes, theoretically possible. If you are writing an app or a code library, you should probably not make an assumption. But as a practical rule of thumb for everybody else, it is perfectly reasonable to assume that an OTF almost certainly contains PostScript-style outlines.
0 -
simon@upo ~/Library/Fonts $ grep 'glyf' *otf | wc -l 26
1 -
Fascinating. The same thing on my computer returns zero. What are the 26 fonts, and what is their provenance?
And… out of how many OTFs in that directory?0 -
Simon Cozens said:
simon@upo ~/Library/Fonts $ grep 'glyf' *otf | wc -l 26
Table name tags are plaintext inside font binaries?! One can grep inside files?! The earth is not flat, you say?! 😳🤯😵Thank you!0 -
You of course need to be careful grepping for table name tags, in case the same text appears in e.g. the name table. But in this case, I followed up with a thorough check, and as a quick back-of-the-envelope sketch, it's super useful.
I have 602 otf files in that directory. The TT-outlined .otf files are all from CreativeMarket, so that's something.1 -
By default FontCreator gives a font file a .otf extension on export, no matter the outline format.
3 -
AFAIR, the Bitstream fonts that shipped with Corel Draw had the .otf extension and were TT-flavored. But maybe not.
0 -
I bought a copy of Corel Draw back in the day solely for the font collection. The fonts had a .TTF extension.
Interestingly (or not?), the version name is "Version 1.01 emb4-OT."
0 -
Does all of this mean that Variable fonts are more naturally inclined to TrueType curves (so the OTF variable font is kind of hack), or it's perfectly fine to have OT(PS) curves (just have to check is the font drawing software capable to export it at the end)?0
-
Variable fonts can be made using TrueType glyph data (glyf + gvar tables) or using a CFF2 table. The ".ttf" / ".otf" extension is orthogonal to this.2
-
Here's an example. I prepared family styles with PostScript outlines and manual PostScript hinting, in the .otf extension. If I wanted to publish a variable font, the file will be in .ttf format.Georg Seifert said:Any reason why they asked for the OTF format?
Some resellers simply won't accept such submission, as all files must be in the same format.
0 -
The unix "strings" tool is useful as a precursor to such grepping as it will strip non text charactersJohannes Neumeier said:Simon Cozens said:simon@upo ~/Library/Fonts $ grep 'glyf' *otf | wc -l 26
Table name tags are plaintext inside font binaries?! One can grep inside files?! The earth is not flat, you say?! 😳🤯😵Thank you!1 -
Neither. It’s a bit more subtle than that....Igor Petrovic said:Does all of this mean that Variable fonts are more naturally inclined to TrueType curves (so the OTF variable font is kind of hack), or it's perfectly fine to have OT(PS) curves (just have to check is the font drawing software capable to export it at the end)?
Variable fonts are not more naturally inclined to either type of curves.
One could argue that the original CFF OpenType fonts are actually a bit of a hack (given the data redundancy inherent in the format, shoving a whole CFF font into a table), BUT the CFF2 format used for CFF variable fonts addresses that problem.
However… as CFF2 variable fonts were just a bit late getting spec’d relative to TTF variable fonts, and supporting TrueType variable fonts involves less engineering, CFF variable fonts are not as well supported as TrueType variable fonts. Some things still don’t support them,
And then again there are many things that do support them, but supported TrueType variable fonts first. So sometimes current/recent versions of browser X or app Y support both flavors, but if you go back a bit, there are versions that supported TT variable fonts but not CFF2 variable fonts.2 -
Thomas Phinney said:Fascinating. The same thing on my computer returns zero. What are the 26 fonts, and what is their provenance?
And… out of how many OTFs in that directory?~/Library/Fonts$ grep -R 'glyf' --include=*otf .
Binary file ./SyrCOMUrhoy.otf matches
In my collection of historic and exotic fonts:
~/font_examples$ grep -R 'glyf' --include=*otf . | wc -l
45
0 -
TT variable fonts also have the benefit of still working in software that does not support variable fonts (showing only the base style), while CFF2 fonts are not useable with such legacy software.5
Categories
- All Categories
- 46 Introductions
- 3.9K Typeface Design
- 485 Type Design Critiques
- 560 Type Design Software
- 1.1K Type Design Technique & Theory
- 654 Type Business
- 852 Font Technology
- 29 Punchcutting
- 519 Typography
- 119 Type Education
- 323 Type History
- 77 Type Resources
- 112 Lettering and Calligraphy
- 33 Lettering Critiques
- 79 Lettering Technique & Theory
- 549 Announcements
- 91 Events
- 114 Job Postings
- 170 Type Releases
- 173 Miscellaneous News
- 276 About TypeDrawers
- 54 TypeDrawers Announcements
- 120 Suggestions and Bug Reports











