2017-01-14 14:27:30 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<ttFont sfntVersion="OTTO" ttLibVersion="3.37">
|
2017-01-14 14:27:30 +00:00
|
|
|
|
|
|
|
<CFF>
|
|
|
|
<major value="1"/>
|
|
|
|
<minor value="0"/>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<CFFFont name="SourceSerifPro-Regular">
|
|
|
|
<version value="1.0"/>
|
|
|
|
<Notice value="Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries."/>
|
|
|
|
<Copyright value="Copyright 2014 Adobe Systems Incorporated. All Rights Reserved."/>
|
|
|
|
<FamilyName value="Source Serif Pro"/>
|
2017-01-14 14:27:30 +00:00
|
|
|
<isFixedPitch value="0"/>
|
|
|
|
<ItalicAngle value="0"/>
|
2017-06-09 07:03:54 +01:00
|
|
|
<UnderlinePosition value="-100"/>
|
2017-01-14 14:27:30 +00:00
|
|
|
<UnderlineThickness value="50"/>
|
|
|
|
<PaintType value="0"/>
|
|
|
|
<CharstringType value="2"/>
|
|
|
|
<FontMatrix value="0.001 0 0 0.001 0 0"/>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<FontBBox value="0 -249 560 758"/>
|
2017-01-14 14:27:30 +00:00
|
|
|
<StrokeWidth value="0"/>
|
|
|
|
<!-- charset is dumped separately as the 'GlyphOrder' element -->
|
|
|
|
<Encoding name="StandardEncoding"/>
|
|
|
|
<Private>
|
|
|
|
<BlueScale value="0.039625"/>
|
|
|
|
<BlueShift value="7"/>
|
|
|
|
<BlueFuzz value="1"/>
|
|
|
|
<ForceBold value="0"/>
|
|
|
|
<LanguageGroup value="0"/>
|
|
|
|
<ExpansionFactor value="0.06"/>
|
|
|
|
<initialRandomSeed value="0"/>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<defaultWidthX value="0"/>
|
|
|
|
<nominalWidthX value="604"/>
|
2017-01-14 14:27:30 +00:00
|
|
|
</Private>
|
|
|
|
<CharStrings>
|
|
|
|
<CharString name=".notdef">
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
36 80 hmoveto
|
|
|
|
480 669 -480 hlineto
|
|
|
|
240 -286 rmoveto
|
|
|
|
-148 236 rlineto
|
|
|
|
296 hlineto
|
|
|
|
32 -523 rmoveto
|
|
|
|
-149 239 149 238 rlineto
|
|
|
|
-360 -477 rmoveto
|
|
|
|
477 vlineto
|
|
|
|
150 -238 rlineto
|
|
|
|
-118 -285 rmoveto
|
|
|
|
148 236 148 -236 rlineto
|
2017-01-14 14:27:30 +00:00
|
|
|
endchar
|
|
|
|
</CharString>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<CharString name="y">
|
|
|
|
-92 92 -249 rmoveto
|
|
|
|
82 56 75 177 67 hvcurveto
|
|
|
|
161 425 54 11 rlineto
|
|
|
|
36 -195 vlineto
|
|
|
|
-36 vlineto
|
|
|
|
87 -12 -123 -340 rlineto
|
|
|
|
-125 341 88 10 rlineto
|
|
|
|
37 -240 vlineto
|
|
|
|
-36 vlineto
|
|
|
|
55 -8 181 -457 -4 -12 -19 -54 -29 -54 -42 -36 rlinecurve
|
|
|
|
-5 5 rlineto
|
|
|
|
28 -27 -21 10 -26 hhcurveto
|
|
|
|
-31 -29 -15 -29 -7 hvcurveto
|
|
|
|
-39 42 -27 50 vhcurveto
|
2017-01-14 14:27:30 +00:00
|
|
|
endchar
|
|
|
|
</CharString>
|
[subset CFF] Fix de-subroutinizing bug when subroutines contain hints (#1499)
* [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.
2019-02-18 01:43:27 -08:00
|
|
|
<CharString name="yacute">
|
|
|
|
-92 92 -249 rmoveto
|
|
|
|
82 56 75 177 67 hvcurveto
|
|
|
|
161 425 54 11 rlineto
|
|
|
|
36 -195 vlineto
|
|
|
|
-36 vlineto
|
|
|
|
87 -12 -123 -340 rlineto
|
|
|
|
-125 341 88 10 rlineto
|
|
|
|
37 -240 vlineto
|
|
|
|
-36 vlineto
|
|
|
|
55 -8 181 -457 -4 -12 -19 -54 -29 -54 -42 -36 rlinecurve
|
|
|
|
-5 5 rlineto
|
|
|
|
28 -27 -21 10 -26 hhcurveto
|
|
|
|
-31 -29 -15 -29 -7 hvcurveto
|
|
|
|
-39 42 -27 50 vhcurveto
|
|
|
|
155 825 rmoveto
|
|
|
|
26 -19 41 36 39 35 41 37 rlinecurve
|
|
|
|
28 26 6 15 14 vvcurveto
|
|
|
|
26 -19 12 -19 -18 -17 -10 -31 -19 vhcurveto
|
|
|
|
-32 -48 -29 -46 -28 -47 rrcurveto
|
2017-01-14 14:27:30 +00:00
|
|
|
endchar
|
|
|
|
</CharString>
|
|
|
|
</CharStrings>
|
|
|
|
</CFFFont>
|
|
|
|
|
|
|
|
<GlobalSubrs>
|
|
|
|
<!-- The 'index' attribute is only for humans; it is ignored when parsed. -->
|
|
|
|
</GlobalSubrs>
|
|
|
|
</CFF>
|
|
|
|
|
|
|
|
</ttFont>
|