From 2e13c733c872d44cee087196a89fd69a0aaee360 Mon Sep 17 00:00:00 2001 From: Jens Kutilek Date: Thu, 19 Dec 2019 11:52:29 +0100 Subject: [PATCH] Remove unneeded check, adjust tests --- Lib/fontTools/varLib/__init__.py | 3 +-- .../test_results/BuildGvarCompositeExplicitDelta.ttx | 11 ----------- Tests/varLib/varLib_test.py | 5 +---- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Lib/fontTools/varLib/__init__.py b/Lib/fontTools/varLib/__init__.py index 5d668c1cf..26731964e 100644 --- a/Lib/fontTools/varLib/__init__.py +++ b/Lib/fontTools/varLib/__init__.py @@ -325,7 +325,6 @@ def _add_gvar(font, masterModel, master_ttfs, tolerance=0.5, optimize=True): for glyph in font.getGlyphOrder(): log.debug("building gvar for glyph '%s'", glyph) - isComposite = glyf[glyph].isComposite() allData = [ m.glyf._getCoordinatesAndControls(glyph, m.hMetrics, m.vMetrics) @@ -363,7 +362,7 @@ def _add_gvar(font, masterModel, master_ttfs, tolerance=0.5, optimize=True): endPts = control.endPts for i, (delta, support) in enumerate(zip(deltas[1:], supports[1:])): - if all(v == 0 for v in delta.array) and not isComposite: + if all(v == 0 for v in delta.array): continue var = TupleVariation(support, delta) if optimize: diff --git a/Tests/varLib/data/test_results/BuildGvarCompositeExplicitDelta.ttx b/Tests/varLib/data/test_results/BuildGvarCompositeExplicitDelta.ttx index ce5b55d29..b624a657a 100644 --- a/Tests/varLib/data/test_results/BuildGvarCompositeExplicitDelta.ttx +++ b/Tests/varLib/data/test_results/BuildGvarCompositeExplicitDelta.ttx @@ -176,17 +176,6 @@ - - - - - - - - - - - diff --git a/Tests/varLib/varLib_test.py b/Tests/varLib/varLib_test.py index 53acc1653..fa94e9354 100644 --- a/Tests/varLib/varLib_test.py +++ b/Tests/varLib/varLib_test.py @@ -339,10 +339,7 @@ class BuildTest(unittest.TestCase): def test_varlib_gvar_explicit_delta(self): """The variable font contains a composite glyph odieresis which does not - need a gvar entry, because all its deltas are 0, but it must be added - anyway to work around an issue with macOS 10.14. - - https://github.com/fonttools/fonttools/issues/1381 + need a gvar entry. """ test_name = "BuildGvarCompositeExplicitDelta" self._run_varlib_build_test(