Maximum UPM for .otf fonts?

13»

Comments

  • Ben BlomBen Blom Posts: 250
    The rounding only kicks in after the scaling to 2048 UPM.
    Because of this rounding, there will only be integer coordinates in the generated font. Is it possible to turn off this rounding, so fractional coordinates will be in the generated font?
  • [Deleted User][Deleted User] Posts: 0
    edited October 2012
    The user and all related content has been deleted.
  • Aha, I just asked David Lemon about this, and I was less than half right, IMO.

    My apologies to Ben (and anybody else who I inadvertently misled).

    Fontographer indeed allowed you to design with higher precision, but it rounded to the grid at output time. So it was a misleading and arguably broken feature.

    PostScript Type 1 fonts could use a "/DIV" in the design space to allow for *real* fractional coordinates in the font itself. This was very rarely used. It was not directly supported by Fontographer.

    I am unsure whether this capability was carried over to OpenType CFF (.otf); probably not.
  • Oh, good. That was my understanding, going way back.

    Ah, well. It was a tantalizing fantasy, for a moment, the notion that we were all laboring under an unnecessary limitation all these years.
  • Ben BlomBen Blom Posts: 250
    It was a tantalizing fantasy, for a moment, the notion that we were all laboring under an unnecessary limitation all these years.
    Indeed. I saw some interesting possibilities on the horizon. But now the world is again as it used to be.

    There's another horizon out there. —Gordon Parks
  • I am unsure whether this capability was carried over to OpenType CFF (.otf); probably not.
    I spoke with David Lemon, too. And he didn’t knew that it was possible to have fraction coordinates in CFF, but is is. And it even works in Windows, Office and MacOSX.

    Here you find a test font. It has a one unit stem with two cuts from both sides. If i looks like this, your renderer supports fractional coordinates. image
    ThinFont-Regular.otf.zip
  • Mark SimonsonMark Simonson Posts: 1,652
    edited October 2012
    Interesting! Opening the font in FontLab, Fontographer 5 reconfigures the coordinates to integers, but Glyphs (1.3.15) and Robofont (1.3) both preserve the fractional coordinates. I recall that there was an earlier version of Robofont that allowed editing with fractional coordinates, maybe when it was in beta?

    Georg, if I open this font in Glyphs and move the points that are on fractional coordinates, the points snap to the nearest integer. (Same happens in Robofont, FWIW.) Is it possible to edit using fractional coordinates in Glyphs now, or is this a future feature?
  • You need to disable rounding for this file in Font Info > Other Settings > Grid Spacing = 0.
  • Mark SimonsonMark Simonson Posts: 1,652
    edited October 2012
    Ah-ha! Same trick works in RoboFont, except it's in Preferences > Glyph View > Snap points to: [ ]

    I checked the OTF file using TTX and I see the fractional coordinates there as well. Although, sometimes they don't seem to be precisely the same. For example, instead of a fractional portion of .875 (which I entered directly into the text field for the point in Glyphs), the ttx file shows .8800048828. Perhaps this is a bug in TTX?

    [Edit: Quite possibly a bug in TTX. If I run the .ttx file back through TTX, it outputs an .otf file that does not match the original. The path with the fractional coordinates is kind of messed up.]

    In any case, this has pretty awesome implications. The +/- 4096 unit coordinate range isn't quite so limited as it seems. For example, you could scale your UPM down to 10 UPM, preserve the point data using decimal units, and have an effective coordinate range of +/- 409,600 units!

    There's gotta be a catch...
  • I recall that there was an earlier version of Robofont that allowed editing with fractional coordinates, maybe when it was in beta?
    Robofont still allows floating points. In the preferences set "Snap points to" zero.
  • There may be other issues, as this is not widely used/tested. But the main catch I know of is that of font size. A larger UPM and/or fractional coordinates should grow the file size, as I understand it. It would be interesting to do some testing with Glyphs and RoboFont to see how much!

    Thanks all for testing the fractional coordinates thing in CFF. So it really does work! Fabulous. :)
  • Font file size doesn't seem to be the issue that it once was. CFF fonts are already usually significantly smaller than TTF for the same source design.
  • Font file size doesn't seem to be the issue that it once was.
    In print maybe. For high volume web sites, or web sites with lots of mobile users, font sizes matter.
  • Ben BlomBen Blom Posts: 250
    For high volume web sites, or web sites with lots of mobile users, font sizes matter.
    It does, but the extra precision of fonts with fractional coordinates, is irrelevant (invisible) for such use. So when a font with fractional coordinates would be available for print use, a version of that font with non-fractional coordinates (rounded to integers), could be created for web use.
  • Just curious what effect, if any, using larger-than-1000-upm would have on things like blue zones. I think I remember the maximum size for an alignment zone is 25.
  • CFF fonts are already usually significantly smaller than TTF for the same source design.

    If you gzip the ttf and otf the differences become a lot smaller
Sign In or Register to comment.