-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1184 from googlefonts/inline-format-4-sub-lookup-…
…test [fea-rs] Add test case for inline format 4 sub rules
- Loading branch information
Showing
2 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
fea-rs/test-data/compile-tests/mini-latin/good/contextual_format_4.fea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
feature test { | ||
# we should only produce two lookups: one contextual, and one ligature, | ||
# with the ligature containing `l o -> z` and `L o` -> Z | ||
sub l' o' l by z; | ||
sub L' o' L by Z; | ||
} test; |
90 changes: 90 additions & 0 deletions
90
fea-rs/test-data/compile-tests/mini-latin/good/contextual_format_4.ttx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?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="test"/> | ||
<Feature> | ||
<!-- LookupCount=1 --> | ||
<LookupListIndex index="0" value="0"/> | ||
</Feature> | ||
</FeatureRecord> | ||
</FeatureList> | ||
<LookupList> | ||
<!-- LookupCount=2 --> | ||
<Lookup index="0"> | ||
<LookupType value="6"/> | ||
<LookupFlag value="0"/> | ||
<!-- SubTableCount=1 --> | ||
<ChainContextSubst index="0" Format="1"> | ||
<Coverage> | ||
<Glyph value="L"/> | ||
<Glyph value="l"/> | ||
</Coverage> | ||
<!-- ChainSubRuleSetCount=2 --> | ||
<ChainSubRuleSet index="0"> | ||
<!-- ChainSubRuleCount=1 --> | ||
<ChainSubRule index="0"> | ||
<!-- BacktrackGlyphCount=0 --> | ||
<!-- InputGlyphCount=2 --> | ||
<Input index="0" value="o"/> | ||
<!-- LookAheadGlyphCount=1 --> | ||
<LookAhead index="0" value="L"/> | ||
<!-- SubstCount=1 --> | ||
<SubstLookupRecord index="0"> | ||
<SequenceIndex value="0"/> | ||
<LookupListIndex value="1"/> | ||
</SubstLookupRecord> | ||
</ChainSubRule> | ||
</ChainSubRuleSet> | ||
<ChainSubRuleSet index="1"> | ||
<!-- ChainSubRuleCount=1 --> | ||
<ChainSubRule index="0"> | ||
<!-- BacktrackGlyphCount=0 --> | ||
<!-- InputGlyphCount=2 --> | ||
<Input index="0" value="o"/> | ||
<!-- LookAheadGlyphCount=1 --> | ||
<LookAhead index="0" value="l"/> | ||
<!-- SubstCount=1 --> | ||
<SubstLookupRecord index="0"> | ||
<SequenceIndex value="0"/> | ||
<LookupListIndex value="1"/> | ||
</SubstLookupRecord> | ||
</ChainSubRule> | ||
</ChainSubRuleSet> | ||
</ChainContextSubst> | ||
</Lookup> | ||
<Lookup index="1"> | ||
<LookupType value="4"/> | ||
<LookupFlag value="0"/> | ||
<!-- SubTableCount=1 --> | ||
<LigatureSubst index="0"> | ||
<LigatureSet glyph="L"> | ||
<Ligature components="o" glyph="Z"/> | ||
</LigatureSet> | ||
<LigatureSet glyph="l"> | ||
<Ligature components="o" glyph="z"/> | ||
</LigatureSet> | ||
</LigatureSubst> | ||
</Lookup> | ||
</LookupList> | ||
</GSUB> | ||
|
||
</ttFont> |