TT points at extrema: off-curve OK?

So, I know the importance of points at extrema for rendering of PS outlines.

For TT outlines, I was surprised to see the construction shown below used for a circle, because the points controlling the extrema are off-curve, and there are no on-curve extrema in some glyphs. I am wondering which is true: (1) it doesn’t matter if the points at the extrema are off-curve points? After all, instructions can control their locations as well as on-curve points. Or (2) the preceding is technically true, but autohinters may expect on-curve points at the extrema, so it is a bad idea? Or (3) something else?

Of course, the fix would be simply to rotate the circle 45°. But there are a lot of these constructions, so it would not be trivial.


Comments

  • Paul MillerPaul Miller Posts: 240
    I believe off curve exterema are not allowed in true type fonts but they do work correctly in many rendering engines so some people take liberties.  This might cause problems for some users of the font.
    Rotating the glyph by 45° (or any other angle) would be trivial in Font Creator.
  • Thomas PhinneyThomas Phinney Posts: 1,899
    Oh, rotating a glyph that happens to be a perfect circle is easy in just about any font editor. But I chose the simplest case and deleted the other elements. Plus, in this font, there are others that are not necessarily full circles, and just identifying which of the many hundreds of glyphs have such problems would take a while.
  • So, I know the importance of points at extrema for rendering of PS outlines.

    For TT outlines, I was surprised to see the construction shown below used for a circle, because the points controlling the extrema are off-curve, and there are no on-curve extrema in some glyphs.
    We strongly recommend adding on-curve points at extrema, but in this case the virtual on-curve points are at the extrema, so technically you could do without them. The existing on-curve points seem useless and you could consider removing those.
  • Paul MillerPaul Miller Posts: 240
    edited March 24
    Oh, rotating a glyph that happens to be a perfect circle is easy in just about any font editor.
    OK let's look at a more complex example.


    If we 'rotate' by 45° there are some off curve extremas but if we then 'optimise' the glyph then it simplifies by taking out unneccessary points and adds on curve extremas.  But the glyph does end up with more points.

    Two operations to get to this.  'Rotate' and 'Optimise' are two commands in Font Creator.
  • Thomas PhinneyThomas Phinney Posts: 1,899
    But I have no interest in rotating the glyph as a whole here (also, an increased number of points would be uncool, but that’s even further off topic). The question is just whether there are reasons to have ON-CURVE points at extrema in TT, and what/how-strong those reasons are.
  • It used to be important as some software (sorry I forgot the exact software and what year we noticed it) calculated the horizontal left side offset based on the "point" bounding box, instead of the visual bounding box.

  • Belleve InvisBelleve Invis Posts: 269
    It used to be important as some software (sorry I forgot the exact software and what year we noticed it) calculated the horizontal left side offset based on the "point" bounding box, instead of the visual bounding box.

    TT's bounding box is directly baked into the GLYF table, so well it is not a big problem...
  • Jens KutilekJens Kutilek Posts: 254
    In Thomas’s example the point bounding box and the "ink" box are identical. That is the case when the off-curve points surrounding the "missing" on-curve point are at the same x coordinate (left and right extremum) or at the same y coordinate (top and bottom extremum).

    It does create problems with autohinters though. I know for one that the VTT autohinter will not find the necessary points to hint in a construction like this. If your autohinter can do it, or you hint manually, no problem.
  • Thomas PhinneyThomas Phinney Posts: 1,899
    Right! That is exactly the sort of thing I was concerned about. Thanks, @Jens Kutilek !
Sign In or Register to comment.