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.
otherwise one gets AttributeError: 'module' object has no attribute 'block'
I noticed this by change. The whole SIL lz4-compressed Glif/Silf tables is still untested...
'identifier' param is part of the AbstractPointPen interface.
Even though it is unused by the segment pen protocol, the caller may attempt
to pass it by positional argument instead of keyword argument, e.g.
2920ddd07c/Lib/fontMath/mathGlyph.py (L486)
this patch avoids the resulting TypeError exception
It's no longer working since we moved to the new fonttools organization, and it wasn't that useful after all
(I never used it myself), so I'm removing it from the main page.
* [subset CFF] Fix bug in de-subroutinizing when subroutines contain hints, issue 1493
The code was skipping executing a subroutine if it had already been desubroutinized. The initial set of vstemhm and hstemhm operators and values may be in a subroutine. If a charstring is being executed which calls such subroutines, they still need to be executed in order to count the number of hint values seen, so that the byte length of the hintmask can be calculated.
I fixed this bug by executing subroutines even if they have already been desubroutinized, as long as (we don't know yet if we are doing hintmasks) or ( we do need a hintmask, but have not yet seen it).
Clean up code per Cosimo's suggestions:
In arg list for stop_hint_count(), use *args to accept unused argument, rather than a dummy positional argument.
Change stop_hintcount_ops to a from a global variable to a class variable in _DesubroutinizingT2Decompiler.
Remove un-needed 'return' at line 387
Remove duplicate assignment of cs at line 437
Add patch for the bug where AttributeError is encountered when remove_hints is run after desubroutinize: remove lines deleting the GlobalSubrs for each FontDict. This always needed to be done only once, and is now in any case done in cff.GlobalSubrs.clear(), at the end of the desubroutinize() function.
Changed test case subset_test.py::'test_no_hinting_desubroutinize_CFF' to reference a font with a non-empty GlobalSubr, in order to trigger AttributeError traceback.