You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve wondered about makeotf’s complaint WARNING: Negative internal leading: win.ascent + win.descent < unitsPerEm for a while, and decided to conduct some investigation.
Setting aside the fact that winAscent and winDescent often are set equivalent to TypoAscender/TypoDescender today, I noticed that makeotf complains in almost every case, unless the values are explicitly set using a OS/2 table override.
Attached is a little script, which writes a dummy UFO, draws a glyph with given ascender and descender, and makes an OTF.
The bounds of the drawn glyph are printed, the OTF’s OS/2 table is read via ttx, and found winAscender/winDescender values are displayed.
As expected, all fonts have the winAscent/winDescent set in the table override.
conclusion
.notdef is always used for the calculation of the winAscent/winDescent values in the font binary
makeotf will always emit the above complaint, unless a feature override is set, which stipulates that |winAscent| + |winDescent| == UPM
changing winAscent/winDescent within the UFO does not make a difference
questions
should the winAscent/winDescent be read from the UFO’s footprint (f.bounds)? (recommendation: maybe)
should the winAscent/winDescent values be read if explicitly specified in the fontinfo.plist? (recommendation: definitely)
should the winAscent/winDescent values fall back to the vertical metrics in fontinfo.plist? (recommendation: yes, better than relying on the bounds of .notdef)
should makeotf even warn about the winAscent/winDescent values, given that vertical metrics are open for interpretation? (open for discussion)
I agree with your recommendations. But if we are going to make changes to makeotf's behavior we will need to be careful to advertise it, as it's possible some users might be relying on the current behavior (even unknowingly) and an unexpected change could cause headaches. Triggering the new behavior with a new flag could avoid that, but then that's yet another flag to document and maintain.
Probably the strongest point is that many values within the UFO are simply ignored by makeotf (also seen in #1470, for example). If the respective values are set, I think they should be used.
Agree that .notdef shouldn't have any bearing on how winAscent and winDescent are set. I think any unknowing reliance on the current behavior is kind of on the user
I’ve wondered about
makeotf
’s complaintWARNING: Negative internal leading: win.ascent + win.descent < unitsPerEm
for a while, and decided to conduct some investigation.Setting aside the fact that
winAscent
andwinDescent
often are set equivalent toTypoAscender
/TypoDescender
today, I noticed thatmakeotf
complains in almost every case, unless the values are explicitly set using a OS/2 table override.Attached is a little script, which writes a dummy UFO, draws a glyph with given ascender and descender, and makes an OTF.
The bounds of the drawn glyph are printed, the OTF’s OS/2 table is read via
ttx
, and found winAscender/winDescender values are displayed.scenario
default output (drawing into .notdef):
This seems to indicate that the glyph we’re drawing is setting the winAscent/winDescent values.
alternate output (drawing into a):
This contradicts the above assumption – all fonts have the same WinAscent value (= bounds of the default .notdef)
with features.fea present:
As expected, all fonts have the winAscent/winDescent set in the table override.
conclusion
makeotf
will always emit the above complaint, unless a feature override is set, which stipulates that|winAscent| + |winDescent| == UPM
questions
f.bounds
)? (recommendation: maybe)makeotf
even warn about the winAscent/winDescent values, given that vertical metrics are open for interpretation? (open for discussion)winAscentDescentTest.py.zip
The text was updated successfully, but these errors were encountered: