[feaLib] Do not emit any Value if ValueFormat is 0
This commit is contained in:
parent
117683680e
commit
83dbae1da5
@ -364,7 +364,11 @@ def makeOpenTypeValueRecord(v):
|
||||
for mask, name, _, _ in otBase.valueRecordFormat:
|
||||
if getattr(vr, name, 0) != 0:
|
||||
vrMask |= mask
|
||||
return vr, vrMask
|
||||
|
||||
if vrMask == 0:
|
||||
return None, 0
|
||||
else:
|
||||
return vr, vrMask
|
||||
|
||||
|
||||
class LookupBuilder(object):
|
||||
|
2
Lib/fontTools/feaLib/testdata/GPOS_1.fea
vendored
2
Lib/fontTools/feaLib/testdata/GPOS_1.fea
vendored
@ -3,6 +3,8 @@ languagesystem DFLT dflt;
|
||||
@sevenEightNine = [seven eight nine];
|
||||
|
||||
feature kern {
|
||||
position zero 0;
|
||||
|
||||
position [one two three] <-80 0 -160 0>;
|
||||
position A <
|
||||
1 2 3 4
|
||||
|
14
Lib/fontTools/feaLib/testdata/GPOS_1.ttx
vendored
14
Lib/fontTools/feaLib/testdata/GPOS_1.ttx
vendored
@ -53,7 +53,7 @@
|
||||
<Lookup index="0">
|
||||
<!-- LookupType=1 -->
|
||||
<LookupFlag value="0"/>
|
||||
<!-- SubTableCount=7 -->
|
||||
<!-- SubTableCount=8 -->
|
||||
<SinglePos index="0" Format="2">
|
||||
<Coverage>
|
||||
<Glyph value="four"/>
|
||||
@ -91,6 +91,12 @@
|
||||
<Value index="2" XPlacement="1" YPlacement="1" XAdvance="805"/>
|
||||
</SinglePos>
|
||||
<SinglePos index="3" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="zero"/>
|
||||
</Coverage>
|
||||
<ValueFormat value="0"/>
|
||||
</SinglePos>
|
||||
<SinglePos index="4" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="one"/>
|
||||
<Glyph value="two"/>
|
||||
@ -100,7 +106,7 @@
|
||||
<ValueFormat value="5"/>
|
||||
<Value XPlacement="-80" XAdvance="-160"/>
|
||||
</SinglePos>
|
||||
<SinglePos index="4" Format="1">
|
||||
<SinglePos index="5" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="seven"/>
|
||||
<Glyph value="eight"/>
|
||||
@ -109,7 +115,7 @@
|
||||
<ValueFormat value="4"/>
|
||||
<Value XAdvance="-100"/>
|
||||
</SinglePos>
|
||||
<SinglePos index="5" Format="1">
|
||||
<SinglePos index="6" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="A"/>
|
||||
<Glyph value="B"/>
|
||||
@ -136,7 +142,7 @@
|
||||
</XAdvDevice>
|
||||
</Value>
|
||||
</SinglePos>
|
||||
<SinglePos index="6" Format="1">
|
||||
<SinglePos index="7" Format="1">
|
||||
<Coverage>
|
||||
<Glyph value="C"/>
|
||||
</Coverage>
|
||||
|
Loading…
x
Reference in New Issue
Block a user