Options

Glyphs with "Too Many Points" - possible problems?

Grzegorz Luk (gluk)Grzegorz Luk (gluk) Posts: 157
edited May 2023 in Font Technology
I'm working right now on a font that generates frames/patterns (guilloche "inspired" :) )

Some glyphs are made up of 4000 points. I got error "Too Many Points" in FontForge, but generated font work fine in apps in which I test it.
I'm wondering if anyone has had any problems with this?

Comments

  • Options
    You should make the font and send a document containing it to a PostScript Printer. If you get a "Limit Check Error" you have a problem. At least that is how we checked in the old days.
  • Options
    Thomas PhinneyThomas Phinney Posts: 2,748
    Although that is a test worth trying, just because you don’t hit any limits on a one-off test on one device, does not mean your font isn’t risky. Sometimes limits vary between devices, which can even be dependent on available memory.

    You do not say what format(s) you are generating, nor what format your outlines are, in your source (PostScript outlines?).

    FontForge docs say that over 1500 points on a single path is risky (for PostScript Type 1 and OpenType CFF, not TrueType), because reportedly the PostScript Language Reference Manual (Appendix B) once said so. (https://fontforge.org/docs/ui/dialogs/problems.html)

    What FontForge docs say:
    Appendix B of the PostScript Language Reference manual says that an interpreter is only required to support paths with 1500 points on them. Most interpreters actually have a much higher limit, so you may change the limit to suit your desires. I believe that control points are included in the count. Note that when checking a quadratic font (ie. a truetype font) there will be at most one control point between any two end points, but when that font gets converted to PostScript there will be two. FontForge currently counts this as one point). TrueType has no such limit.
    The cited passage does not exist in Appendix B of my hard copy PLRM 3rd edition, 1999, which was the final edition of the book. So I am not quite sure what to make of that, I assume it was info in a previous edition that was later removed, probably because it was not a very hard limit?

    PostScript Level 1 and 2 devices are extremely rare these days. New PostScript devices were generally PostScript 3, starting about 25 years ago. By 20 years ago new “PostScript compatible” devices were generally PS3 as well.

  • Options
    Grzegorz Luk (gluk)Grzegorz Luk (gluk) Posts: 157
    edited May 2023
    ... make the font and send a document containing it to a PostScript Printer...
    it's good idea. As far PDF with embedded font has been printed without problems.

    ...
    You do not say what format(s) you are generating, nor what format your outlines are, in your source (PostScript outlines?).

    FontForge docs say that over 1500 points on a single path is risky (for PostScript Type 1 and OpenType CFF, not TrueType),

    You are right. Error "Too Many Points" only occurs for cubic curves (OpenType CFF). Font with quadratic curves (TrueType) passes validation without problems. (but with TrueType problem is in rounded coordinates)
  • Options
    John HudsonJohn Hudson Posts: 2,977
    but with TrueType problem is in rounded coordinates
    Increase UPM scaling grid size?

  • Options
    Grzegorz Luk (gluk)Grzegorz Luk (gluk) Posts: 157
    edited May 2023
    but with TrueType problem is in rounded coordinates
    Increase UPM scaling grid size?

    yes, in my case it's a good solution, if you accept such differences like below:
     - in green cubic curves
     - in black/red quadratic curves with rounded coordinates in 4096 size



    it's probably weird, but these little differences make me prefer cubic curves with coordinates rounded to hundredths. Most probably TrueType font will be fallback solution
  • Options
    At some point it can even freeze your system. We recently had a customer with a font (quadratic curves) that made Windows choke. It had glyphs that had outlines with more than 20K points.




  • Options
    ... It had glyphs that had outlines with more than 20K points.

    glyphs in my font are 4000 points but this thread raises some concerns :)

    I finally decided on TrueType font for base package, but I made OTF version too in additional ZIP.

    Both versions are are available for download HERE
    (even for system tests only :)


  • Options
    Maybe it can take some time to render very detailled glyphs in some environments.

    AFAIR I tried to use Goudy Cloister Initials in a website and it took some seconds. Maybe it was an other font.

    Made a ttx and the letter A has 4555 lines, which is more than points in the glyph.


Sign In or Register to comment.