[feaLib] Test compilation of zero values in SinglePos statements
In context of SinglePos, makeotf compiles zero values to value records of format 0. feaLib already does the same, but it's good to have tests to make sure that this doesn't accidentally change. https://github.com/fonttools/fonttools/issues/633
This commit is contained in:
parent
40474f1aab
commit
790c93d5cf
@ -64,8 +64,8 @@ class BuilderTest(unittest.TestCase):
|
||||
spec10
|
||||
bug453 bug457 bug463 bug501 bug502 bug504 bug505 bug506 bug509
|
||||
bug512 bug568
|
||||
name size size2 multiple_feature_blocks
|
||||
omitted_GlyphClassDef
|
||||
name size size2 multiple_feature_blocks omitted_GlyphClassDef
|
||||
ZeroValue_SinglePos
|
||||
""".split()
|
||||
|
||||
def __init__(self, methodName):
|
||||
|
6
Tests/feaLib/data/ZeroValue_SinglePos.fea
Normal file
6
Tests/feaLib/data/ZeroValue_SinglePos.fea
Normal file
@ -0,0 +1,6 @@
|
||||
# For SinglePos statements, zeroes should get compiled to ValueRecord format 0.
|
||||
# https://github.com/fonttools/fonttools/issues/633
|
||||
feature TEST {
|
||||
pos A 0; # format A
|
||||
pos B <0 0 0 0>; # format B
|
||||
} TEST;
|
47
Tests/feaLib/data/ZeroValue_SinglePos.ttx
Normal file
47
Tests/feaLib/data/ZeroValue_SinglePos.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="TEST"/>
|
||||
<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