add test files triggering the AttributeError: 'NoneType' object has no attribute 'getAlternateGlyphs'
https://github.com/googlefonts/fontmake/issues/648
This commit is contained in:
parent
a6e050ab09
commit
f6cbc45a6a
@ -71,6 +71,7 @@ class BuilderTest(unittest.TestCase):
|
|||||||
ZeroValue_ChainSinglePos_horizontal ZeroValue_ChainSinglePos_vertical
|
ZeroValue_ChainSinglePos_horizontal ZeroValue_ChainSinglePos_vertical
|
||||||
PairPosSubtable ChainSubstSubtable ChainPosSubtable LigatureSubtable
|
PairPosSubtable ChainSubstSubtable ChainPosSubtable LigatureSubtable
|
||||||
AlternateSubtable MultipleSubstSubtable SingleSubstSubtable
|
AlternateSubtable MultipleSubstSubtable SingleSubstSubtable
|
||||||
|
aalt_chain_contextual_subst
|
||||||
""".split()
|
""".split()
|
||||||
|
|
||||||
def __init__(self, methodName):
|
def __init__(self, methodName):
|
||||||
|
20
Tests/feaLib/data/aalt_chain_contextual_subst.fea
Normal file
20
Tests/feaLib/data/aalt_chain_contextual_subst.fea
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# https://github.com/googlefonts/fontmake/issues/648
|
||||||
|
|
||||||
|
lookup CNTXT_LIGS {
|
||||||
|
sub f i by f_i;
|
||||||
|
sub c t by c_t;
|
||||||
|
} CNTXT_LIGS;
|
||||||
|
|
||||||
|
lookup CNTXT_SUB {
|
||||||
|
sub n by n.end;
|
||||||
|
sub s by s.end;
|
||||||
|
} CNTXT_SUB;
|
||||||
|
|
||||||
|
feature calt {
|
||||||
|
sub [a e i o u] f' lookup CNTXT_LIGS i' n' lookup CNTXT_SUB;
|
||||||
|
sub [a e i o u] c' lookup CNTXT_LIGS t' s' lookup CNTXT_SUB;
|
||||||
|
} calt;
|
||||||
|
|
||||||
|
feature aalt {
|
||||||
|
feature calt;
|
||||||
|
} aalt;
|
139
Tests/feaLib/data/aalt_chain_contextual_subst.ttx
Normal file
139
Tests/feaLib/data/aalt_chain_contextual_subst.ttx
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
<?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=2 -->
|
||||||
|
<FeatureIndex index="0" value="0"/>
|
||||||
|
<FeatureIndex index="1" value="1"/>
|
||||||
|
</DefaultLangSys>
|
||||||
|
<!-- LangSysCount=0 -->
|
||||||
|
</Script>
|
||||||
|
</ScriptRecord>
|
||||||
|
</ScriptList>
|
||||||
|
<FeatureList>
|
||||||
|
<!-- FeatureCount=2 -->
|
||||||
|
<FeatureRecord index="0">
|
||||||
|
<FeatureTag value="aalt"/>
|
||||||
|
<Feature>
|
||||||
|
<!-- LookupCount=1 -->
|
||||||
|
<LookupListIndex index="0" value="0"/>
|
||||||
|
</Feature>
|
||||||
|
</FeatureRecord>
|
||||||
|
<FeatureRecord index="1">
|
||||||
|
<FeatureTag value="calt"/>
|
||||||
|
<Feature>
|
||||||
|
<!-- LookupCount=1 -->
|
||||||
|
<LookupListIndex index="0" value="3"/>
|
||||||
|
</Feature>
|
||||||
|
</FeatureRecord>
|
||||||
|
</FeatureList>
|
||||||
|
<LookupList>
|
||||||
|
<!-- LookupCount=4 -->
|
||||||
|
<Lookup index="0">
|
||||||
|
<LookupType value="1"/>
|
||||||
|
<LookupFlag value="0"/>
|
||||||
|
<!-- SubTableCount=1 -->
|
||||||
|
<SingleSubst index="0">
|
||||||
|
<Substitution in="n" out="n.end"/>
|
||||||
|
<Substitution in="s" out="s.end"/>
|
||||||
|
</SingleSubst>
|
||||||
|
</Lookup>
|
||||||
|
<Lookup index="1">
|
||||||
|
<LookupType value="4"/>
|
||||||
|
<LookupFlag value="0"/>
|
||||||
|
<!-- SubTableCount=1 -->
|
||||||
|
<LigatureSubst index="0">
|
||||||
|
<LigatureSet glyph="c">
|
||||||
|
<Ligature components="t" glyph="c_t"/>
|
||||||
|
</LigatureSet>
|
||||||
|
<LigatureSet glyph="f">
|
||||||
|
<Ligature components="i" glyph="f_i"/>
|
||||||
|
</LigatureSet>
|
||||||
|
</LigatureSubst>
|
||||||
|
</Lookup>
|
||||||
|
<Lookup index="2">
|
||||||
|
<LookupType value="1"/>
|
||||||
|
<LookupFlag value="0"/>
|
||||||
|
<!-- SubTableCount=1 -->
|
||||||
|
<SingleSubst index="0">
|
||||||
|
<Substitution in="n" out="n.end"/>
|
||||||
|
<Substitution in="s" out="s.end"/>
|
||||||
|
</SingleSubst>
|
||||||
|
</Lookup>
|
||||||
|
<Lookup index="3">
|
||||||
|
<LookupType value="6"/>
|
||||||
|
<LookupFlag value="0"/>
|
||||||
|
<!-- SubTableCount=2 -->
|
||||||
|
<ChainContextSubst index="0" Format="3">
|
||||||
|
<!-- BacktrackGlyphCount=1 -->
|
||||||
|
<BacktrackCoverage index="0">
|
||||||
|
<Glyph value="a"/>
|
||||||
|
<Glyph value="e"/>
|
||||||
|
<Glyph value="i"/>
|
||||||
|
<Glyph value="o"/>
|
||||||
|
<Glyph value="u"/>
|
||||||
|
</BacktrackCoverage>
|
||||||
|
<!-- InputGlyphCount=3 -->
|
||||||
|
<InputCoverage index="0">
|
||||||
|
<Glyph value="f"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<InputCoverage index="1">
|
||||||
|
<Glyph value="i"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<InputCoverage index="2">
|
||||||
|
<Glyph value="n"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<!-- LookAheadGlyphCount=0 -->
|
||||||
|
<!-- SubstCount=2 -->
|
||||||
|
<SubstLookupRecord index="0">
|
||||||
|
<SequenceIndex value="0"/>
|
||||||
|
<LookupListIndex value="1"/>
|
||||||
|
</SubstLookupRecord>
|
||||||
|
<SubstLookupRecord index="1">
|
||||||
|
<SequenceIndex value="2"/>
|
||||||
|
<LookupListIndex value="2"/>
|
||||||
|
</SubstLookupRecord>
|
||||||
|
</ChainContextSubst>
|
||||||
|
<ChainContextSubst index="1" Format="3">
|
||||||
|
<!-- BacktrackGlyphCount=1 -->
|
||||||
|
<BacktrackCoverage index="0">
|
||||||
|
<Glyph value="a"/>
|
||||||
|
<Glyph value="e"/>
|
||||||
|
<Glyph value="i"/>
|
||||||
|
<Glyph value="o"/>
|
||||||
|
<Glyph value="u"/>
|
||||||
|
</BacktrackCoverage>
|
||||||
|
<!-- InputGlyphCount=3 -->
|
||||||
|
<InputCoverage index="0">
|
||||||
|
<Glyph value="c"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<InputCoverage index="1">
|
||||||
|
<Glyph value="t"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<InputCoverage index="2">
|
||||||
|
<Glyph value="s"/>
|
||||||
|
</InputCoverage>
|
||||||
|
<!-- LookAheadGlyphCount=0 -->
|
||||||
|
<!-- SubstCount=2 -->
|
||||||
|
<SubstLookupRecord index="0">
|
||||||
|
<SequenceIndex value="0"/>
|
||||||
|
<LookupListIndex value="1"/>
|
||||||
|
</SubstLookupRecord>
|
||||||
|
<SubstLookupRecord index="1">
|
||||||
|
<SequenceIndex value="2"/>
|
||||||
|
<LookupListIndex value="2"/>
|
||||||
|
</SubstLookupRecord>
|
||||||
|
</ChainContextSubst>
|
||||||
|
</Lookup>
|
||||||
|
</LookupList>
|
||||||
|
</GSUB>
|
||||||
|
|
||||||
|
</ttFont>
|
Loading…
x
Reference in New Issue
Block a user