diff options
Diffstat (limited to 'Tests/feaLib/data')
-rw-r--r-- | Tests/feaLib/data/PairPosSubtable.fea | 4 | ||||
-rw-r--r-- | Tests/feaLib/data/bug2276.fea | 11 | ||||
-rw-r--r-- | Tests/feaLib/data/bug2276.ttx | 59 | ||||
-rw-r--r-- | Tests/feaLib/data/delete_glyph.fea | 4 | ||||
-rw-r--r-- | Tests/feaLib/data/delete_glyph.ttx | 15 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_conditionset.fea | 13 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_conditionset.ttx | 67 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_scalar_anchor.fea | 4 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_scalar_anchor.ttx | 101 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_scalar_valuerecord.fea | 5 | ||||
-rw-r--r-- | Tests/feaLib/data/variable_scalar_valuerecord.ttx | 104 |
11 files changed, 381 insertions, 6 deletions
diff --git a/Tests/feaLib/data/PairPosSubtable.fea b/Tests/feaLib/data/PairPosSubtable.fea index cb78801c..1fcc1eba 100644 --- a/Tests/feaLib/data/PairPosSubtable.fea +++ b/Tests/feaLib/data/PairPosSubtable.fea @@ -4,7 +4,6 @@ languagesystem latn dflt; @group1 = [b o]; @group2 = [c d]; @group3 = [v w]; -@group4 = []; lookup kernlookup { pos A V -34; @@ -13,9 +12,6 @@ lookup kernlookup { subtable; pos @group1 @group3 -10; pos @group3 @group2 -20; - subtable; - pos @group4 @group1 -10; - pos @group4 @group4 -10; } kernlookup; feature kern { diff --git a/Tests/feaLib/data/bug2276.fea b/Tests/feaLib/data/bug2276.fea new file mode 100644 index 00000000..96f98859 --- /dev/null +++ b/Tests/feaLib/data/bug2276.fea @@ -0,0 +1,11 @@ +# https://github.com/fonttools/fonttools/issues/2276 +lookup EMPTY { + # pass +} EMPTY; +feature ss01 { + sub a by a.alt1; + lookup EMPTY; +} ss01; +feature aalt { + feature ss01; +} aalt; diff --git a/Tests/feaLib/data/bug2276.ttx b/Tests/feaLib/data/bug2276.ttx new file mode 100644 index 00000000..57902daf --- /dev/null +++ b/Tests/feaLib/data/bug2276.ttx @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="4.22"> + + <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="ss01"/> + <Feature> + <!-- LookupCount=1 --> + <LookupListIndex index="0" value="1"/> + </Feature> + </FeatureRecord> + </FeatureList> + <LookupList> + <!-- LookupCount=2 --> + <Lookup index="0"> + <LookupType value="1"/> + <LookupFlag value="0"/> + <!-- SubTableCount=1 --> + <SingleSubst index="0"> + <Substitution in="a" out="a.alt1"/> + </SingleSubst> + </Lookup> + <Lookup index="1"> + <LookupType value="1"/> + <LookupFlag value="0"/> + <!-- SubTableCount=1 --> + <SingleSubst index="0"> + <Substitution in="a" out="a.alt1"/> + </SingleSubst> + </Lookup> + </LookupList> + </GSUB> + +</ttFont> diff --git a/Tests/feaLib/data/delete_glyph.fea b/Tests/feaLib/data/delete_glyph.fea index 36e0f0f9..ab4b93f1 100644 --- a/Tests/feaLib/data/delete_glyph.fea +++ b/Tests/feaLib/data/delete_glyph.fea @@ -1,3 +1,7 @@ feature test { sub a by NULL; } test; + +feature test { + sub [a b c] by NULL; +} test; diff --git a/Tests/feaLib/data/delete_glyph.ttx b/Tests/feaLib/data/delete_glyph.ttx index 777f6e36..b28259fb 100644 --- a/Tests/feaLib/data/delete_glyph.ttx +++ b/Tests/feaLib/data/delete_glyph.ttx @@ -22,13 +22,14 @@ <FeatureRecord index="0"> <FeatureTag value="test"/> <Feature> - <!-- LookupCount=1 --> + <!-- LookupCount=2 --> <LookupListIndex index="0" value="0"/> + <LookupListIndex index="1" value="1"/> </Feature> </FeatureRecord> </FeatureList> <LookupList> - <!-- LookupCount=1 --> + <!-- LookupCount=2 --> <Lookup index="0"> <LookupType value="2"/> <LookupFlag value="0"/> @@ -37,6 +38,16 @@ <Substitution in="a" out=""/> </MultipleSubst> </Lookup> + <Lookup index="1"> + <LookupType value="2"/> + <LookupFlag value="0"/> + <!-- SubTableCount=1 --> + <MultipleSubst index="0"> + <Substitution in="a" out=""/> + <Substitution in="b" out=""/> + <Substitution in="c" out=""/> + </MultipleSubst> + </Lookup> </LookupList> </GSUB> diff --git a/Tests/feaLib/data/variable_conditionset.fea b/Tests/feaLib/data/variable_conditionset.fea new file mode 100644 index 00000000..7009c62b --- /dev/null +++ b/Tests/feaLib/data/variable_conditionset.fea @@ -0,0 +1,13 @@ +languagesystem DFLT dflt; + +lookup symbols_heavy { + sub a by b; +} symbols_heavy; + +conditionset heavy { + wght 700 900; +} heavy; + +variation rvrn heavy { + lookup symbols_heavy; +} rvrn; diff --git a/Tests/feaLib/data/variable_conditionset.ttx b/Tests/feaLib/data/variable_conditionset.ttx new file mode 100644 index 00000000..18b156fa --- /dev/null +++ b/Tests/feaLib/data/variable_conditionset.ttx @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ttFont> + + <GSUB> + <Version value="0x00010001"/> + <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="rvrn"/> + <Feature> + <!-- LookupCount=0 --> + </Feature> + </FeatureRecord> + </FeatureList> + <LookupList> + <!-- LookupCount=1 --> + <Lookup index="0"> + <LookupType value="1"/> + <LookupFlag value="0"/> + <!-- SubTableCount=1 --> + <SingleSubst index="0"> + <Substitution in="a" out="b"/> + </SingleSubst> + </Lookup> + </LookupList> + <FeatureVariations> + <Version value="0x00010000"/> + <!-- FeatureVariationCount=1 --> + <FeatureVariationRecord index="0"> + <ConditionSet> + <!-- ConditionCount=1 --> + <ConditionTable index="0" Format="1"> + <AxisIndex value="0"/> + <FilterRangeMinValue value="0.625"/> + <FilterRangeMaxValue value="0.875"/> + </ConditionTable> + </ConditionSet> + <FeatureTableSubstitution> + <Version value="0x00010000"/> + <!-- SubstitutionCount=1 --> + <SubstitutionRecord index="0"> + <FeatureIndex value="0"/> + <Feature> + <!-- LookupCount=1 --> + <LookupListIndex index="0" value="0"/> + </Feature> + </SubstitutionRecord> + </FeatureTableSubstitution> + </FeatureVariationRecord> + </FeatureVariations> + </GSUB> + +</ttFont> diff --git a/Tests/feaLib/data/variable_scalar_anchor.fea b/Tests/feaLib/data/variable_scalar_anchor.fea new file mode 100644 index 00000000..c4787986 --- /dev/null +++ b/Tests/feaLib/data/variable_scalar_anchor.fea @@ -0,0 +1,4 @@ +languagesystem DFLT dflt; +feature kern { + pos cursive one <anchor 0 (wght=200:12 wght=900:22 wdth=150,wght=900:42)> <anchor NULL>; +} kern; diff --git a/Tests/feaLib/data/variable_scalar_anchor.ttx b/Tests/feaLib/data/variable_scalar_anchor.ttx new file mode 100644 index 00000000..6bb55691 --- /dev/null +++ b/Tests/feaLib/data/variable_scalar_anchor.ttx @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ttFont> + + <GDEF> + <Version value="0x00010003"/> + <VarStore Format="1"> + <Format value="1"/> + <VarRegionList> + <!-- RegionAxisCount=2 --> + <!-- RegionCount=2 --> + <Region index="0"> + <VarRegionAxis index="0"> + <StartCoord value="0.0"/> + <PeakCoord value="0.875"/> + <EndCoord value="0.875"/> + </VarRegionAxis> + <VarRegionAxis index="1"> + <StartCoord value="0.0"/> + <PeakCoord value="0.0"/> + <EndCoord value="0.0"/> + </VarRegionAxis> + </Region> + <Region index="1"> + <VarRegionAxis index="0"> + <StartCoord value="0.0"/> + <PeakCoord value="0.875"/> + <EndCoord value="0.875"/> + </VarRegionAxis> + <VarRegionAxis index="1"> + <StartCoord value="0.0"/> + <PeakCoord value="0.5"/> + <EndCoord value="0.5"/> + </VarRegionAxis> + </Region> + </VarRegionList> + <!-- VarDataCount=1 --> + <VarData index="0"> + <!-- ItemCount=1 --> + <NumShorts value="0"/> + <!-- VarRegionCount=2 --> + <VarRegionIndex index="0" value="0"/> + <VarRegionIndex index="1" value="1"/> + <Item index="0" value="[10, 20]"/> + </VarData> + </VarStore> + </GDEF> + + <GPOS> + <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="kern"/> + <Feature> + <!-- LookupCount=1 --> + <LookupListIndex index="0" value="0"/> + </Feature> + </FeatureRecord> + </FeatureList> + <LookupList> + <!-- LookupCount=1 --> + <Lookup index="0"> + <LookupType value="3"/> + <LookupFlag value="0"/> + <!-- SubTableCount=1 --> + <CursivePos index="0" Format="1"> + <Coverage> + <Glyph value="one"/> + </Coverage> + <!-- EntryExitCount=1 --> + <EntryExitRecord index="0"> + <EntryAnchor Format="3"> + <XCoordinate value="0"/> + <YCoordinate value="12"/> + <YDeviceTable> + <StartSize value="0"/> + <EndSize value="0"/> + <DeltaFormat value="32768"/> + </YDeviceTable> + </EntryAnchor> + </EntryExitRecord> + </CursivePos> + </Lookup> + </LookupList> + </GPOS> + +</ttFont> diff --git a/Tests/feaLib/data/variable_scalar_valuerecord.fea b/Tests/feaLib/data/variable_scalar_valuerecord.fea new file mode 100644 index 00000000..bf9a26b7 --- /dev/null +++ b/Tests/feaLib/data/variable_scalar_valuerecord.fea @@ -0,0 +1,5 @@ +languagesystem DFLT dflt; +feature kern { + pos one 1; + pos two <0 (wght=200:12 wght=900:22 wdth=150,wght=900:42) 0 0>; +} kern; diff --git a/Tests/feaLib/data/variable_scalar_valuerecord.ttx b/Tests/feaLib/data/variable_scalar_valuerecord.ttx new file mode 100644 index 00000000..338b7221 --- /dev/null +++ b/Tests/feaLib/data/variable_scalar_valuerecord.ttx @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ttFont> + + <GDEF> + <Version value="0x00010003"/> + <VarStore Format="1"> + <Format value="1"/> + <VarRegionList> + <!-- RegionAxisCount=2 --> + <!-- RegionCount=2 --> + <Region index="0"> + <VarRegionAxis index="0"> + <StartCoord value="0.0"/> + <PeakCoord value="0.875"/> + <EndCoord value="0.875"/> + </VarRegionAxis> + <VarRegionAxis index="1"> + <StartCoord value="0.0"/> + <PeakCoord value="0.0"/> + <EndCoord value="0.0"/> + </VarRegionAxis> + </Region> + <Region index="1"> + <VarRegionAxis index="0"> + <StartCoord value="0.0"/> + <PeakCoord value="0.875"/> + <EndCoord value="0.875"/> + </VarRegionAxis> + <VarRegionAxis index="1"> + <StartCoord value="0.0"/> + <PeakCoord value="0.5"/> + <EndCoord value="0.5"/> + </VarRegionAxis> + </Region> + </VarRegionList> + <!-- VarDataCount=1 --> + <VarData index="0"> + <!-- ItemCount=1 --> + <NumShorts value="0"/> + <!-- VarRegionCount=2 --> + <VarRegionIndex index="0" value="0"/> + <VarRegionIndex index="1" value="1"/> + <Item index="0" value="[10, 20]"/> + </VarData> + </VarStore> + </GDEF> + + <GPOS> + <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="kern"/> + <Feature> + <!-- LookupCount=1 --> + <LookupListIndex index="0" value="0"/> + </Feature> + </FeatureRecord> + </FeatureList> + <LookupList> + <!-- LookupCount=1 --> + <Lookup index="0"> + <LookupType value="1"/> + <LookupFlag value="0"/> + <!-- SubTableCount=2 --> + <SinglePos index="0" Format="1"> + <Coverage> + <Glyph value="one"/> + </Coverage> + <ValueFormat value="4"/> + <Value XAdvance="1"/> + </SinglePos> + <SinglePos index="1" Format="1"> + <Coverage> + <Glyph value="two"/> + </Coverage> + <ValueFormat value="34"/> + <Value YPlacement="12"> + <YPlaDevice> + <StartSize value="0"/> + <EndSize value="0"/> + <DeltaFormat value="32768"/> + </YPlaDevice> + </Value> + </SinglePos> + </Lookup> + </LookupList> + </GPOS> + +</ttFont> |