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.
so that's comparable/hashable/immutable and can be used as key in a dict or set.
The fromXML instance method was dropped since it relied on the object being mutable.
A fromHex classmethod replaces it.
Fixes#1483
'remove_unused_subroutines' method expects a 'GlobalSubrs' attribute but the 'desubroutinize'
method deletes it. We don't have to call 'remove_unused_subroutines' at the end of 'desubroutinize'
method, we can just delete all the local subroutines, and clear the GlobalSubrsIndex.
Only call 'remove_unused_subroutines' method once, when we are not desubroutinizing.