OTF Variable fonts

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

Comments

  • Any reason why they asked for the OTF format?
  • 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.
  • Andrea T.Andrea T. Posts: 29
    Any reason why they asked for the OTF format?
    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?
  • Glyphs doesn’t support CFF2 variable fonts, yet. We are working on it. 
  • Andrea T.Andrea T. Posts: 29
    Glyphs doesn’t support CFF2 variable fonts, yet. We are working on it. 
    thank you.

    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.
    and thank you too!
  • edited August 31
    At the moment you can use either fontmake or AFDKO to build variable-CFF2 fonts from the command line, or use FontLab 7. Fontmake and FontLab 7 can take .glyphs files directly, or can be used to convert them to designspace+UFOs to be used with AFDKO.

  • 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. 
  • 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 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.
  • Please be aware a variable font with an OTF file extension can contain either TrueType outlines or PostScript-style outlines.
    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.

    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.
  • Andrea T. 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 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.
    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'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.)
  • John HudsonJohn Hudson Posts: 1,901
    '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.
  • Andrea T. 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 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.
    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.
    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.

    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. 

  • Andrea T. 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 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.
    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.
    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.

    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.
Sign In or Register to comment.