fonttools/Tests/varLib/data/test_results/BuildTestCFF2.ttx
ReadRoberts a460eee80b varLib. Add support for building CFF2 variable font
Fix syntax error reported by build system: can't mix string string types when doing literal concatenation

Fix local import reference - doesn't work in Python3.

Addressed issues raised by @msousa for PR 1345 yesterday.

Will change cff2_merge_funcs.py and cff2mergePen.py from tab to space indentations after the current comments are resolved.

Add various improvements from comments:
- do not edit the post table under varLib.build(). Setting post table format 2 or 3 is now expected to be managed by whatever calls varLib.build().
- In the t2CharStringPen module, rename closure _round() nested in makeRoundFunc to an exportable function, and use it in cff2mergePen.
- remove TypeSupply copyright from cff2mergePen.
- use modulo function to convert float to int when it is meant to be 0 in cff2mergePen.

cff2_merge_funcs.py:merge_PrivateDicts() should only be blending the hint related fields in the PrivateDict. This oversight that was surfaced by @madig reporting an error building his Cantrell font. The bug appeared when the font was subroutinized, as the pen draw method then has to interpret the Subr field in order to access T2Charstring subroutines.

Fix expected ttx output file. When I removed the logic to add glyph names to the post table, glyph names in the ttx file changed.

Miguel prefers a simple list for readability in cff2_merge_funs.py:138.
2018-11-12 11:38:18 -08:00

263 lines
8.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ttFont sfntVersion="OTTO" ttLibVersion="3.31">
<fvar>
<!-- Weight -->
<Axis>
<AxisTag>wght</AxisTag>
<Flags>0x0</Flags>
<MinValue>200.0</MinValue>
<DefaultValue>400.0</DefaultValue>
<MaxValue>900.0</MaxValue>
<AxisNameID>256</AxisNameID>
</Axis>
<!-- ExtraLight -->
<!-- PostScript: TestCFF2Roman-ExtraLight -->
<NamedInstance flags="0x0" postscriptNameID="258" subfamilyNameID="257">
<coord axis="wght" value="200.0"/>
</NamedInstance>
<!-- Light -->
<!-- PostScript: TestCFF2Roman-Light -->
<NamedInstance flags="0x0" postscriptNameID="260" subfamilyNameID="259">
<coord axis="wght" value="300.0"/>
</NamedInstance>
<!-- Regular -->
<!-- PostScript: TestCFF2Roman-Regular -->
<NamedInstance flags="0x0" postscriptNameID="262" subfamilyNameID="261">
<coord axis="wght" value="400.0"/>
</NamedInstance>
<!-- Medium -->
<!-- PostScript: TestCFF2Roman-Medium -->
<NamedInstance flags="0x0" postscriptNameID="264" subfamilyNameID="263">
<coord axis="wght" value="500.0"/>
</NamedInstance>
<!-- Semibold -->
<!-- PostScript: TestCFF2Roman-Semibold -->
<NamedInstance flags="0x0" postscriptNameID="266" subfamilyNameID="265">
<coord axis="wght" value="600.0"/>
</NamedInstance>
<!-- Bold -->
<!-- PostScript: TestCFF2Roman-Bold -->
<NamedInstance flags="0x0" postscriptNameID="268" subfamilyNameID="267">
<coord axis="wght" value="700.0"/>
</NamedInstance>
<!-- Black -->
<!-- PostScript: TestCFF2Roman-Black -->
<NamedInstance flags="0x0" postscriptNameID="270" subfamilyNameID="269">
<coord axis="wght" value="900.0"/>
</NamedInstance>
</fvar>
<CFF2>
<major value="2"/>
<minor value="0"/>
<CFFFont name="CFF2Font">
<FontMatrix value="0.001 0 0 0.001 0 0"/>
<FDArray>
<FontDict index="0">
<Private>
<BlueValues>
<blend value="-12 0 0"/>
<blend value="0 0 0"/>
<blend value="486 -8 14"/>
<blend value="498 0 0"/>
<blend value="574 4 -8"/>
<blend value="586 0 0"/>
<blend value="638 6 -10"/>
<blend value="650 0 0"/>
<blend value="656 2 -2"/>
<blend value="668 0 0"/>
<blend value="712 6 -10"/>
<blend value="724 0 0"/>
</BlueValues>
<OtherBlues>
<blend value="-217 -17 29"/>
<blend value="-205 0 0"/>
</OtherBlues>
<BlueScale value="0.0625"/>
<BlueShift value="7"/>
<BlueFuzz value="0"/>
<StdHW>
<blend value="67 -39.0 67.0"/>
</StdHW>
<StdVW>
<blend value="85 -51.0 87.0"/>
</StdVW>
<StemSnapH>
<blend value="67 -39 67"/>
</StemSnapH>
<StemSnapV>
<blend value="85 -51 87"/>
</StemSnapV>
</Private>
</FontDict>
</FDArray>
<CharStrings>
<CharString name=".notdef">
62 22 -38 1 blend
hmoveto
476 -44 76 1 blend
660 -476 44 -76 1 blend
hlineto
109 -601 -61 103 -27 45 2 blend
rmoveto
73 131 54 102 29 -47 45 -75 10 -18 4 -6 4 blend
4 0 52 -102 73 -131 10 -16 -4 6 27 -47 -45 75 4 blend
rlineto
-300 52 -42 72 -10 16 2 blend
rmoveto
461 75 -125 1 blend
vlineto
127 -232 27 -45 -38 64 2 blend
rlineto
44 48 -22 36 -22 36 2 blend
rmoveto
-50 93 -66 119 234 -6 10 -1 3 -28 48 49 -83 68 -114 5 blend
0 -65 -119 -49 -93 -29 47 -49 83 -5 9 1 -3 4 blend
rlineto
44 -48 -22 36 22 -36 2 blend
rmoveto
126 232 26 -44 38 -64 2 blend
rlineto
-461 -75 125 1 blend
vlineto
</CharString>
<CharString name="A">
31 19 -31 1 blend
hmoveto
86 -54 90 1 blend
hlineto
115 366 23 73 21 72 21 76 25 -42 30 -50 5 -9 7 -11 3 -4 -4 6 3 -7 6 -10 8 blend
rlinecurve
4 hlineto
20 -76 22 -72 23 -73 4 -6 -6 10 2 -3 4 -6 5 -9 -7 11 6 blend
rrcurveto
113 -366 90 25 -40 -30 50 -56 92 3 blend
0 -221 656 -15 25 4 -6 2 blend
rlineto
-96 68 -112 1 blend
hlineto
-104 -457 -30 49 33 -55 2 blend
rmoveto
301 68 -301 -8 15 -40 65 8 -15 3 blend
hlineto
</CharString>
<CharString name="T">
258 26 -44 1 blend
hmoveto
84 585 217 71 -518 -71 217 -52 88 47 -79 17 -30 -43 73 18 -28 43 -73 17 -30 7 blend
hlineto
</CharString>
<CharString name="dollar">
304 7 -12 1 blend
34 rmoveto
125 86 65 96 -22 38 2 -3 -9 15 -2 4 4 blend
hvcurveto
183 -324 -21 110 1 -1 -14 22 -11 17 32 -54 4 blend
vvcurveto
50 42 32 67 68 36 -21 -36 47 18 -29 15 -24 12 -21 18 -31 8 -13 -2 3 -3 5 -2 4 -3 5 9 blend
vhcurveto
44 49 -24 40 -29 49 2 blend
rlineto
44 -46 -54 33 -89 -6 8 5 -7 9 -15 -1 3 4 -8 5 blend
hhcurveto
-115 -81 -59 -94 16 -26 3 -7 5 -9 6 -10 4 blend
hvcurveto
-174 324 22 -124 8 -14 14 -22 6 -10 -32 56 4 blend
vvcurveto
-51 -42 -35 -78 -76 -62 31 37 -52 -19 31 -14 23 -15 25 -25 41 -9 15 -4 7 7 -11 -3 3 12 -20 9 blend
vhcurveto
-39 -58 73 -26 73 -26 73 -27 21 -35 36 -58 -28 -8 -12 -28 0 28 -14 -2 18 -3 27 27 8 blend
rlinecurve
-24 566 6 -21 0 -34 2 blend
rmoveto
56 -26 56 1 blend
hlineto
50 0 9 1 blend
0 50 50 0 9 0 10 2 blend
vvcurveto
-56 26 -56 1 blend
hlineto
-50 0 -9 1 blend
0 -50 -50 0 -9 0 -10 2 blend
vvcurveto
-562 0 102 1 blend
vmoveto
-148 56 148 0 -68 -26 56 0 68 3 blend
vlineto
</CharString>
<CharString name="glyph00003">
304 7 -12 1 blend
34 rmoveto
125 86 65 96 -22 38 2 -3 -9 15 -2 4 4 blend
hvcurveto
183 -324 -21 110 1 -1 -14 22 -11 17 32 -54 4 blend
vvcurveto
50 42 32 67 68 36 -21 -36 47 18 -29 15 -24 12 -21 18 -31 8 -13 -2 3 -3 5 -2 4 -3 5 9 blend
vhcurveto
44 49 -24 40 -29 49 2 blend
rlineto
44 -46 -54 33 -89 -6 8 5 -7 9 -15 -1 3 4 -8 5 blend
hhcurveto
-115 -81 -59 -94 16 -26 3 -7 5 -9 6 -10 4 blend
hvcurveto
-174 324 22 -124 8 -14 14 -22 6 -10 -32 56 4 blend
vvcurveto
-51 -42 -35 -78 -76 -62 31 37 -52 -19 31 -14 23 -15 25 -25 41 -9 15 -4 7 7 -11 -3 3 12 -20 9 blend
vhcurveto
-39 -58 21 -35 36 -58 2 blend
rlineto
-43 52 84 -36 83 5 -11 -7 13 -11 17 -4 8 8 -13 5 blend
hhcurveto
-51 -147 -19 32 1 -3 2 blend
rmoveto
159 857 -56 7 -159 -858 -1 1 3 -3 26 -44 -3 5 1 -1 -2 4 6 blend
rlineto
</CharString>
</CharStrings>
<VarStore Format="1">
<Format value="1"/>
<VarRegionList>
<!-- RegionAxisCount=1 -->
<!-- RegionCount=2 -->
<Region index="0">
<VarRegionAxis index="0">
<StartCoord value="-1.0"/>
<PeakCoord value="-1.0"/>
<EndCoord value="0.0"/>
</VarRegionAxis>
</Region>
<Region index="1">
<VarRegionAxis index="0">
<StartCoord value="0.0"/>
<PeakCoord value="1.0"/>
<EndCoord value="1.0"/>
</VarRegionAxis>
</Region>
</VarRegionList>
<!-- VarDataCount=1 -->
<VarData index="0">
<!-- ItemCount=0 -->
<NumShorts value="0"/>
<!-- VarRegionCount=2 -->
<VarRegionIndex index="0" value="0"/>
<VarRegionIndex index="1" value="1"/>
</VarData>
</VarStore>
</CFFFont>
<GlobalSubrs>
<!-- The 'index' attribute is only for humans; it is ignored when parsed. -->
</GlobalSubrs>
</CFF2>
</ttFont>