From a1c6c184ef34ea1b8143640f6442ce863e77f469 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 2 May 2021 23:59:49 +0200 Subject: [PATCH] [mutator] Round lsb for CFF2 fonts as well Otherwise head table compilation would fail because of the floating point side bearing. The advance width is already rounded. --- Lib/fontTools/varLib/mutator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/fontTools/varLib/mutator.py b/Lib/fontTools/varLib/mutator.py index db0e5f900..263c4e611 100644 --- a/Lib/fontTools/varLib/mutator.py +++ b/Lib/fontTools/varLib/mutator.py @@ -138,7 +138,7 @@ def interpolate_cff2_metrics(varfont, topDict, glyphOrder, loc): # Happens with non-marking glyphs lsb_delta = 0 else: - lsb = boundsPen.bounds[0] + lsb = otRound(boundsPen.bounds[0]) lsb_delta = entry[1] - lsb if lsb_delta or width_delta: