Support was added in db49f20d6b2629e1ba25c4afd3fb60817387f3d6, but there
was only a parser test and no builder test, fix the build and add a
builder test based on the existing parser one.
Fixes https://github.com/fonttools/fonttools/issues/1901
Raise if lookup_index is None, which would happen only of the lookup
referenced belongs to the wrong table. The error message needs to be less
cryptic, though.
Fixes https://github.com/fonttools/fonttools/issues/1896
Setting script that is the same as current language system should make
no effect. This is not documented in the spec, but it is what makeotf
does. This as the effect of preserving lookupflag when set before such a
script statement.
Fixes https://github.com/fonttools/fonttools/issues/1824
Allow for making more lookups support subtabe breaks. Although AFDKO’s
makeotf supports subtable breaks only in pair pos lookups, I believe
that is an implementation limit that we don’t have to follow; all
OpenType lookups has subtables and it should be possible to code that in
the feature files.
If Coverage is None then the subtable is a noop that does nothing and
there is no point in building it. As a bonus, it makes OTS happy since
it will reject subtables where coverageOffset is NULL (0) and the spec
does not say whether this is allowed or not.
ufo2ft feature writer calls feaLib builder with tables=[GSUB] first, to run closure
over glyph substitutions; if the GSUB features contains 'featureNames' blocks, then
an AssertionError will be raised; in this case, we can simply skip building the
FeatureParams tables as we haven't build the name records they point to.
all otData arrays are decompiled as lists (see otConverters.BaseConverter.readArray).
If one tries to call the subsetter on a GSUB table that was not read from file
but was just built from feaLib, it crases with a TypeError because it's expecting
list but finds tuples.
Traceback (most recent call last):
File /home/clupo/Github/fonttools/Lib/fontTools/subset/__init__.py, line 1462, in prune_lookups
lookup_indices = self.table.FeatureList.collect_lookups(feature_indices)
File /home/clupo/Github/fonttools/Lib/fontTools/subset/__init__.py, line 1263, in collect_lookups
if i < self.FeatureCount), [])
TypeError: can only concatenate list (not tuple) to list
`tables=None` by default will build all supported tables;
To build only some of these and ignore the others, one can pass a
subset of supported tables tags: .e.g. `tables={'GSUB'}` will only
build the GSUB, even if the feature file may contain e.g. GPOS
related features.