Correct hmtx LSB calculation for CFF glyphs?

Adam Twardoch (List) list.adam at twardoch.com
Wed Aug 26 01:54:50 CEST 2015


I have a question regarding the correct calculation of the hmtx LSB (left sidebearing) entry for fonts with CFF glyphs. 

Let's assume that we have a glyph that does not have points on horizontal extrema. Let's also differentiate between the bbox (the box of extrema coordinates made out of all on- and off-curve points of a glyph) and the inkbox (the box of extrema coordinates made out of the real Bezier curves plotted by the points). 

In example A, all points have integer coordinates. So the glyph's bbox left extrema is at x=30, while the inkbox left extrema is at 31.09: 
https://www.dropbox.com/s/5vtr5fazt0dsjxn/150826-CFF-hmtx.PNG?dl=0

In example B, points have fractional coordinates. The glyph's boox left extrema is at x=29.61 while the inkbox left extrema is still at 31.09: 
https://www.dropbox.com/s/jv4of26s9yevw2v/150826-CFF-hmtx2.PNG?dl=0

What would be the correct value that should be written into the "hmtx" LSB field for both examples? 

Best,
Adam




More information about the mpeg-otspec mailing list