-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fea-rs] Support 'pos a 20 b' pairpos syntax
This syntax is not documented, but it is treated as equivalent to 'pos a b 20' by both afdko and feaLib, and exists in at least one noto font.
- Loading branch information
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
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
7 changes: 7 additions & 0 deletions
7
fea-rs/test-data/compile-tests/mini-latin/good/pair_pos_funny_syntax.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,7 @@ | ||
feature derp { | ||
# this is not documented syntax but is treated equivalently to | ||
# 'pos a b 30' and is handled by both feaLib and afdko | ||
pos a 30 b; | ||
# so basically the same as, | ||
pos a c 30; | ||
} derp; |
59 changes: 59 additions & 0 deletions
59
fea-rs/test-data/compile-tests/mini-latin/good/pair_pos_funny_syntax.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,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ttFont> | ||
|
||
<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="derp"/> | ||
<Feature> | ||
<!-- LookupCount=1 --> | ||
<LookupListIndex index="0" value="0"/> | ||
</Feature> | ||
</FeatureRecord> | ||
</FeatureList> | ||
<LookupList> | ||
<!-- LookupCount=1 --> | ||
<Lookup index="0"> | ||
<LookupType value="2"/> | ||
<LookupFlag value="0"/> | ||
<!-- SubTableCount=1 --> | ||
<PairPos index="0" Format="1"> | ||
<Coverage> | ||
<Glyph value="a"/> | ||
</Coverage> | ||
<ValueFormat1 value="4"/> | ||
<ValueFormat2 value="0"/> | ||
<!-- PairSetCount=1 --> | ||
<PairSet index="0"> | ||
<!-- PairValueCount=2 --> | ||
<PairValueRecord index="0"> | ||
<SecondGlyph value="b"/> | ||
<Value1 XAdvance="30"/> | ||
</PairValueRecord> | ||
<PairValueRecord index="1"> | ||
<SecondGlyph value="c"/> | ||
<Value1 XAdvance="30"/> | ||
</PairValueRecord> | ||
</PairSet> | ||
</PairPos> | ||
</Lookup> | ||
</LookupList> | ||
</GPOS> | ||
|
||
</ttFont> |