OTF vs TTF extension in VF. What really is the difference?

Rafał BuchnerRafał Buchner Posts: 16
edited August 2020 in Font Technology
Hey,

I will ask something that maybe looks like a fundamental question, but I believe it is quite essential for young font engineers/devs/(type)designers like myself who knows a little about the history behind OTF and TTF.

I've been curious what really makes the difference between those two extensions. Especially when it comes to Variable Fonts, is it just a type of curves? Or is there any other differences? Or maybe is it just another reminiscence of so-called "font wars" without any particular meaning? Or is there any differences in hinting implementation?

In what circumstances is it recommended to use "otf" and "ttf" variable fonts?

Is there some particular reason why  I usually see variable fonts with ",ttf" extension?




Comments

  • The type of curve (quadratic or cubic Bézier) is indeed the most important thing you need to know, but do not be fooled by the font file extension. It is the inside that counts. Here is a tutorial that explains it all:

    A rasterizer that does not support font variations will most likely show the default instance of a variable font if it contains TrueType based outlines. It will fail with CFF based outlines.


  • nice! thanks!!!

  • RichardWRichardW Posts: 100
    One niggle with the tutorial.  So far as I am aware, TrueType fonts are WOFFable.
  • Thank you for letting me know. You are right. I have updated the tutorial.
  • Isn't it
    TrueType —> WOFF
    PostScript —> WOFF2
    ?
  • Mark SimonsonMark Simonson Posts: 1,652
    WOFF and WOFF2 can both contain either TrueType or PostScript. WOFF2 is just a later variant of WOFF that is more compressed (mainly).

  • Is there some particular reason why  I usually see variable fonts with ",ttf" extension?

    Yes, there are several reasons.

    When the OpenType spec was first extended  to support variable fonts, the TrueType flavor of variable fonts came first, by quite a bit. Plus, the PostScript version requires supporting a significantly new flavor of OpenType-PostScript font, with the CFF2 table.

    Font development tools and browsers generally supported .ttf variable fonts much sooner as a result, so it became a feedback loop with font designers/developers as well.

    Plus, as previously noted by Erwiin Denissen, variable TTF fonts still act like single-master fonts in environments that do not support variable fonts. Variable OTF fonts just fail to work at all in older environments.
  • I should add that to this day, there is still limited tools support for OTF variable fonts. You can build them with command-line tools (AFDKO, FontMake) or with FontLab 7 (officially beta I think? but seems to work). Glyphs does not support export of OTF variable fonts as yet.
  • I should add that to this day, there is still limited tools support for OTF variable fonts. You can build them with command-line tools (AFDKO, FontMake) or with FontLab 7 (officially beta I think? but seems to work). Glyphs does not support export of OTF variable fonts as yet.
    OTF is not equal to PostScript, so this is rather confusing.





  • John HudsonJohn Hudson Posts: 2,955
    OTF is not equal to PostScript, so this is rather confusing.

    Indeed, please let's stop using OTF to refer to CFF or CFF2 flavour OpenType fonts. It is imprecise, and the only reason all OpenType fonts, including TrueType flavour, do not use OTF as a file extension is that TrueType OpenType fonts with the TTF extension work, with limitations, in older and non-OT environments.

    [I'd also recommend not using the term PostScript at all when referring to OpenType fonts. Technically, CFF is not PostScript (the CFF format as published by Adobe independently of the more restricted definition of the CFF table in an OpenType font, provides for embedding of PostScript language code, but is not itself PostScript). As one of the Adobe engineers pointed out during the specification of the CFF2 table, there is not one line of PostScript in a CFF OT font, so we should stop referring to them as PS.]
  • It is all very confusing. Even the specs mention such variable font has PostScript-style outlines in a Compact Font Format 2.0 (CFF2) table. What about:

    Variable TT fonts (TrueType)
    Variable glyf fonts (table tag)
    Variable quadratic fonts (Bézier curve)

    versus

    Variable CFF2 fonts (table tag)
    Variable cubic fonts (Bézier curve)
    Variable OTTO fonts (sfntVersion)





  • I think the term PostScript in this context mostly means Cubic bezier and not the underlying encoding/storage of the font. 
  • This discussion seems to be mostly from an engineering perspective. I think it might also be helpful to consider from a vendor/marketing perspective. What do font vendors think are useful distinctions to make as they engage with their customers?

    (Tom has pointed out one customer-relevant issue: with a TT-flavoured variable font, the default instance continues to work in legacy software. I'm not sure to what extent, in practice, it's an issue for potential customers.)
Sign In or Register to comment.