Are off-curve points considered for the Bounding Box?

I am hoping that someone can shed light on whether off-curve points are considered when calculating a OpenType glyph's bounding box. There is a check in Font Validator - E1112 - that reads in part:

"The bounding box ... does not agree with the bounding box dimensions defined by the control points at the extremes of the glyph contours ... This problem may be caused by the font creation tool incorrectly using off-curve control points to calculate the bounding box ..."

The citation for this test is http://go.microsoft.com/fwlink?LinkID=10348 which is the glyph table specification. I can't glean any information from that spec on whether to consider off-curve points.

Martin Hosken's FontUtils perl code (the Glyph.pm module) does use off-curve points (as far as I can tell). I can't off-hand locate the code in the FontTools Python code.

Any guidance appreciated.

Comments

  • ClintGossClintGoss Posts: 60
    And what would we do for glyphs with no on-curve points?
  • ClintGossClintGoss Posts: 60
    edited May 26
    Did some tests on FontCreator, and it also appears to use the "All-points bounding box" method ... see the next message (with an image) ...
  • ClintGossClintGoss Posts: 60
    Did some tests on FontCreator, and it also appears to use the "All-points bounding box" method.

    The "On-curve bounding box" approach suggested by FontValidator seems to be ?in error? or maybe overridden by general practice ...
  • I think it could depend on the font format too. I did a quick test and it seems that TTF fonts rely on the off-curve points to set x- and y-Max/Min in the head table. On the other hand, CFF fonts use the virtual extreme point (as you called "inked bounding box") to set these values in the head table.
  • ClintGossClintGoss Posts: 60
    Interesting! So I'm guessing a font authoring tool would need to run an in-memory rendering algorithm (Freetype?) to determine the bounding box for CFF outlines.

    Is there documentation on this? A search for "virtual extreme point" and related searches turns up nothing ...
  • Rafael SaraivaRafael Saraiva Posts: 22
    edited May 27
    So I'm guessing a font authoring tool would need to run an in-memory rendering algorithm (Freetype?) to determine the bounding box for CFF outlines.
    I have no clue :) Just did an empirical experiment because I was curious.

    by the way, I made up "virtual extreme point"... the wording makes sense to me, so don't take this term seriously.
  • ClintGossClintGoss Posts: 60
    I'm a bit flummoxed that all this basic stuff isn't better specified ... If the Federal Aviation Regs were "make it up as you go" and "let's see what other folks are doing" we might be in a pickle.
  • Thomas PhinneyThomas Phinney Posts: 1,857
    This is only the tip of the iceberg. A lot in OpenType is like this!
Sign In or Register to comment.