The method that was being used to read the header from the input was
inadvertently dropping the first non-header line on the floor; although
this happens to be okay in some cases (where there is an empty line
after the header) in the case of newer versions of the
ScriptExtensions.txt file, this was causing the generated code to be
missing the first entry, for U+00B7 (MIDDLE DOT)
This is a regression introduced with https://github.com/fonttools/fonttools/pull/3750
The test currently fails because we are now applying rounding to the
coordinates extracted from each component of a composite glyph, *before*
these are transformed; with nested components of components with non trivial transforms, the rounding errors compound leading to incorrect bounds.
the test makes sure that the bounding box of composite glyph with non trivial transform pointing to base glyphs with un-rounded floating-point coordinates, still get their bounding box computed on the rounded-off integer coordinates.
see https://github.com/googlefonts/fontc/issues/1206
When passing a parsed feature file that has variable anchors to
addOpenTypeFeatures(), builder would modify the anchors in place and
discard the variations, which break any subsequent use of the feature
file.
I encountered this building a font that has variable cursing anchors
with ufo2ft. The cursFeatureWriter would write the variable anchors, but
then when kernFeatreWriter compiles the file to get GSUB closure, the
variation would be dropped from the anchors, and later when when the
feature data is compiled into the font, the anchors would be compiled
without variations.
The consideration for blends had made it into O(n^2).
Make it linear again.
Speeds up Tests/cffLib/specializer_test.py::CFFSpecializeProgramTest::test_maxstack_blends
3x for me.
Set to True by default. Can be turned to False on the table,
or at Glyph() compile time.
Also fixes Glyph's draw() to expand the glyph first. Otherwise
it was failing.
If we subset this test font (a subset of Google Fonts' Andika-Regular.ttf) and request to keep 'cv43', only the FirstParaUILabelNameID (324) is currently kept, the other two (325 amd 326) get incorectly dropped.
All referenced nameIDs should be kept.
This will be fixed with https://github.com/fonttools/fonttools/pull/3617
```
> assert nameIDs == keepNameIDs
E assert {0, 1, 2, 3, 4, 5, 6, 321, 322, 323, 324} == {0, 1, 2, 3, 4, 5, 6, 321, 322, 323, 324, 325, 326}
E Extra items in the right set:
E 325
E 326
E Full diff:
E - {0, 1, 2, 3, 4, 5, 6, 321, 322, 323, 324, 325, 326}
E ? ----------
E + {0, 1, 2, 3, 4, 5, 6, 321, 322, 323, 324}
```
I typically run tests like:
$ python setup.py build_ext -i && PYTHONPATH=Lib pytest
Previously, this particular test and only this, required
that a `pip install -e .` has had happened. Not anymore.