Add test case for glyph names with backslash
Resolves https://github.com/fonttools/fonttools/issues/457
This commit is contained in:
parent
38e71cf45a
commit
248336a0fb
@ -39,6 +39,7 @@ def makeTTFont():
|
|||||||
a_n_d T_h T_h.swash germandbls ydieresis yacute breve
|
a_n_d T_h T_h.swash germandbls ydieresis yacute breve
|
||||||
grave acute dieresis macron circumflex cedilla umlaut ogonek caron
|
grave acute dieresis macron circumflex cedilla umlaut ogonek caron
|
||||||
damma hamza sukun kasratan lam_meem_jeem noon.final noon.initial
|
damma hamza sukun kasratan lam_meem_jeem noon.final noon.initial
|
||||||
|
\\glyphNameWithBackslash1 \\glyphNameWithBackslash2
|
||||||
""".split()
|
""".split()
|
||||||
font = TTFont()
|
font = TTFont()
|
||||||
font.setGlyphOrder(glyphs)
|
font.setGlyphOrder(glyphs)
|
||||||
@ -59,7 +60,8 @@ class BuilderTest(unittest.TestCase):
|
|||||||
spec6h_ii spec6h_iii_1 spec6h_iii_3d spec8a spec8b spec8c
|
spec6h_ii spec6h_iii_1 spec6h_iii_3d spec8a spec8b spec8c
|
||||||
spec9a spec9b spec9c1 spec9c2 spec9c3 spec9d spec9e spec9f spec9g
|
spec9a spec9b spec9c1 spec9c2 spec9c3 spec9d spec9e spec9f spec9g
|
||||||
spec10
|
spec10
|
||||||
bug453 bug463 bug501 bug502 bug504 bug505 bug506 bug509 bug512 bug568
|
bug453 bug457 bug463 bug501 bug502 bug504 bug505 bug506 bug509
|
||||||
|
bug512 bug568
|
||||||
name size size2 multiple_feature_blocks
|
name size size2 multiple_feature_blocks
|
||||||
""".split()
|
""".split()
|
||||||
|
|
||||||
|
5
Lib/fontTools/feaLib/testdata/bug457.fea
vendored
Normal file
5
Lib/fontTools/feaLib/testdata/bug457.fea
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@group = [\glyphNameWithBackslash1 \glyphNameWithBackslash2];
|
||||||
|
|
||||||
|
feature liga {
|
||||||
|
sub @group by G;
|
||||||
|
} liga;
|
44
Lib/fontTools/feaLib/testdata/bug457.ttx
vendored
Normal file
44
Lib/fontTools/feaLib/testdata/bug457.ttx
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ttFont>
|
||||||
|
|
||||||
|
<GSUB>
|
||||||
|
<Version value="0x00010000"/>
|
||||||
|
<ScriptList>
|
||||||
|
<!-- ScriptCount=1 -->
|
||||||
|
<ScriptRecord index="0">
|
||||||
|
<ScriptTag value="DFLT"/>
|
||||||
|
<Script>
|
||||||
|
<DefaultLangSys>
|
||||||
|
<ReqFeatureIndex value="65535"/>
|
||||||
|
<!-- FeatureCount=1 -->
|
||||||
|
<FeatureIndex index="0" value="0"/>
|
||||||
|
</DefaultLangSys>
|
||||||
|
<!-- LangSysCount=0 -->
|
||||||
|
</Script>
|
||||||
|
</ScriptRecord>
|
||||||
|
</ScriptList>
|
||||||
|
<FeatureList>
|
||||||
|
<!-- FeatureCount=1 -->
|
||||||
|
<FeatureRecord index="0">
|
||||||
|
<FeatureTag value="liga"/>
|
||||||
|
<Feature>
|
||||||
|
<!-- LookupCount=1 -->
|
||||||
|
<LookupListIndex index="0" value="0"/>
|
||||||
|
</Feature>
|
||||||
|
</FeatureRecord>
|
||||||
|
</FeatureList>
|
||||||
|
<LookupList>
|
||||||
|
<!-- LookupCount=1 -->
|
||||||
|
<Lookup index="0">
|
||||||
|
<!-- LookupType=1 -->
|
||||||
|
<LookupFlag value="0"/>
|
||||||
|
<!-- SubTableCount=1 -->
|
||||||
|
<SingleSubst index="0">
|
||||||
|
<Substitution in="\glyphNameWithBackslash1" out="G"/>
|
||||||
|
<Substitution in="\glyphNameWithBackslash2" out="G"/>
|
||||||
|
</SingleSubst>
|
||||||
|
</Lookup>
|
||||||
|
</LookupList>
|
||||||
|
</GSUB>
|
||||||
|
|
||||||
|
</ttFont>
|
Loading…
x
Reference in New Issue
Block a user