[feaLib] Test compiling zero values for SinglePos in vertical context
https://github.com/fonttools/fonttools/issues/633
This commit is contained in:
parent
45c266441e
commit
dc7bf89648
@ -65,7 +65,7 @@ class BuilderTest(unittest.TestCase):
|
||||
bug453 bug457 bug463 bug501 bug502 bug504 bug505 bug506 bug509
|
||||
bug512 bug514 bug568 bug633
|
||||
name size size2 multiple_feature_blocks omitted_GlyphClassDef
|
||||
ZeroValue_SinglePos
|
||||
ZeroValue_SinglePos_horizontal ZeroValue_SinglePos_vertical
|
||||
ZeroValue_PairPos_horizontal ZeroValue_PairPos_vertical
|
||||
ZeroValue_ChainSinglePos_horizontal ZeroValue_ChainSinglePos_vertical
|
||||
""".split()
|
||||
|
8
Tests/feaLib/data/ZeroValue_SinglePos_horizontal.fea
Normal file
8
Tests/feaLib/data/ZeroValue_SinglePos_horizontal.fea
Normal file
@ -0,0 +1,8 @@
|
||||
# For SinglePos statements, zeroes should get compiled to ValueRecord format 0.
|
||||
# https://github.com/fonttools/fonttools/issues/633
|
||||
|
||||
# Zero value in a horizontal context.
|
||||
feature kern {
|
||||
pos A 0; # format A
|
||||
pos B <0 0 0 0>; # format B
|
||||
} kern;
|
@ -20,7 +20,7 @@
|
||||
<FeatureList>
|
||||
<!-- FeatureCount=1 -->
|
||||
<FeatureRecord index="0">
|
||||
<FeatureTag value="TEST"/>
|
||||
<FeatureTag value="kern"/>
|
||||
<Feature>
|
||||
<!-- LookupCount=1 -->
|
||||
<LookupListIndex index="0" value="0"/>
|
@ -1,6 +1,8 @@
|
||||
# For SinglePos statements, zeroes should get compiled to ValueRecord format 0.
|
||||
# https://github.com/fonttools/fonttools/issues/633
|
||||
feature TEST {
|
||||
|
||||
# Zero value in a vertical context.
|
||||
feature vkrn {
|
||||
pos A 0; # format A
|
||||
pos B <0 0 0 0>; # format B
|
||||
} TEST;
|
||||
} vkrn;
|
47
Tests/feaLib/data/ZeroValue_SinglePos_vertical.ttx
Normal file
47
Tests/feaLib/data/ZeroValue_SinglePos_vertical.ttx
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ttFont sfntVersion="true" ttLibVersion="3.0">
|
||||
|
||||
<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="vkrn"/>
|
||||
<Feature>
|
||||
<!-- LookupCount=1 -->
|
||||
<LookupListIndex index="0" value="0"/>
|
||||
</Feature>
|
||||
</FeatureRecord>
|
||||
</FeatureList>
|
||||
<LookupList>
|
||||
<!-- LookupCount=1 -->
|
||||
<Lookup index="0">
|
||||
<LookupType value="1"/>
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=1 -->
|
||||
<SinglePos index="0" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="A"/>
|
||||
<Glyph value="B"/>
|
||||
</Coverage>
|
||||
<ValueFormat value="0"/>
|
||||
</SinglePos>
|
||||
</Lookup>
|
||||
</LookupList>
|
||||
</GPOS>
|
||||
|
||||
</ttFont>
|
Loading…
x
Reference in New Issue
Block a user