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.
technically we are tweaking the original example from the spec but it keeps the spirit, so that the product of glyph classes produces the same representation in the font as if the sequences were manually enumerated (while keeping the declaration order)
Allow variable scaler in ligature caret position and build
CaretValueFormat3 with DeviceTable. Does not support non-variable device
table, but can be added if someone really really wants it.
If a variable scalar does not vary (i.e. all values are the same), we
can simplify it and use a simple value instead. Arguably users shouldn’t
be using variable scalar in this case, but it helps when the feature
code is auto generated so each feaLib users doesn’t have to do the
check done here themselves.
This patch ensures that feaLib always produces a name table with entries
sorted in the order proscribed by the spec: platform id, encoding id,
language id, name id.
This breaks some tests, and so I have manually updated the test data to
match the new outputs.
* Speed up varscalar with caching
* Don't use cached_property
* Make model pool a class attribute
* Don't catch things on the values side
* Remove unused import
* Replaced all from ...py23 import * with explicit name imports, or removed completely when possible.
* Replaced tounicode() with tostr()
* Changed all BytesIO ans StringIO imports to from io import ..., replaced all UnicodeIO with StringIO.
* Replaced all unichr() with chr()
* Misc minor tweaks and fixes