Not sure if empty ComponentRecords can be optimized away.
For the time being, leaving the output unchanged so that
the refactoring has no effect on the generated files.
In f0eb7e98ca0642f17ac82433db8c957fffd6a9d3, the various subclasses
of otTables.ClassDef were merged into one single class. Therefore,
we can now always instantiate otTables.ClassDef() which is simpler.
In f0eb7e98ca0642f17ac82433db8c957fffd6a9d3, the various subclasses
of otTables.Coverage were merged into one single class. Therefore,
we can now always instantiate otTables.Coverage() which is simpler.
Make the output of otlLib.buildLigatureSubst() deterministic.
Before this change, otlLib ligatures were emitted in a non-deterministic
sorting order (depending on what hash value Python would give
to a string tuple).
On Windows, some Python versions format "Jan 01" while others
format "Jan 1"; this caused test failures on the build farm.
By using a date without leading zeros (2011-12-13), we can
work around this.
https://github.com/behdad/fonttools/issues/455
Before this change, feaLib did not handle feature files that specified
`feature aalt` whose block just was referring to other features without
defining any lookups on its own. After this change, we can handle it.
Resolves https://github.com/behdad/fonttools/issues/441
The code for building GDEF tables had grown quite a bit, so it was
hard to understand what was going on. After this change, each GDEF
subtable gets built by a separate method. This increases legibility.
The current OpenType Feature File specification is silent about
what the proper behavior should be when a single glyph has multiple
LigatureCaretByPos or LigatureCaretByIndex statements. After
this change, we match the behavior of Adobe's `makeotf` tool.
Arguably, `makeotf` might not be optimal in its current behavior,
but it seems better to match the existing toolchain than to have
two conflicting interpretations of an ambiguous spec. Once the
specification gets clarified, we will of course follow.
See https://github.com/adobe-type-tools/afdko/issues/95 for the
spec discussion.
https://github.com/behdad/fonttools/issues/445
Not sure whether it makes much sense to define a contextual chain
that points to a GSUB type 3, but the OpenType feature file syntax
does not explicitly forbid it. Adobe's `makeotf` tool rejects this
kind of input with "Contextual alternate rule not yet supported";
this implies that the construct is valid (albeit definitely exotic).
Before this change, the compiler had (essentially) implemented lookup
references by inlining the statements of the invoked lookup into the
current feature block. After this change, the lookup gets compiled
separately, and any call sites make explicit calls.
Resolves https://github.com/behdad/fonttools/issues/445 for single
substitutions. The compact forms for chaining to other GSUB types
are not yet supported; these will get fixed in follow-up changes.