[varLib] Round advance width and LSB to integers

This commit is contained in:
Miguel Sousa 2017-03-04 12:54:20 -08:00
parent e01c52244d
commit 7bf853ed2e

View File

@ -154,8 +154,8 @@ def _SetCoordinates(font, glyphName, coord):
glyph.recalcBounds(glyf)
horizontalAdvanceWidth = rightSideX - leftSideX
leftSideBearing = glyph.xMin - leftSideX
horizontalAdvanceWidth = round(rightSideX - leftSideX)
leftSideBearing = round(glyph.xMin - leftSideX)
# XXX Handle vertical
font["hmtx"].metrics[glyphName] = horizontalAdvanceWidth, leftSideBearing