[feaLib] Set RangeStart/RangeEnd as float

Fixes the one failing test after previous commit.
This commit is contained in:
Behdad Esfahbod 2021-03-24 08:04:14 -07:00
parent cc76169074
commit d0aaf1bceb
3 changed files with 5 additions and 5 deletions

View File

@ -971,8 +971,8 @@ class Parser(object):
location = self.cur_token_location_
DesignSize = self.expect_decipoint_()
SubfamilyID = self.expect_number_()
RangeStart = 0
RangeEnd = 0
RangeStart = 0.
RangeEnd = 0.
if self.next_token_type_ in (Lexer.NUMBER, Lexer.FLOAT) or SubfamilyID != 0:
RangeStart = self.expect_decipoint_()
RangeEnd = self.expect_decipoint_()

View File

@ -142,7 +142,7 @@ class BuilderTest(unittest.TestCase):
feapath = self.getpath("%s.fea" % name)
addOpenTypeFeatures(font, feapath)
self.expect_ttx(font, self.getpath("%s.ttx" % name))
# Check that
# Check that:
# 1) tables do compile (only G* tables as long as we have a mock font)
# 2) dumping after save-reload yields the same TTX dump as before
for tag in ('GDEF', 'GSUB', 'GPOS'):

View File

@ -26,8 +26,8 @@
<DesignSize value="10.0"/>
<SubfamilyID value="0"/>
<SubfamilyNameID value="0"/>
<RangeStart value="0"/>
<RangeEnd value="0"/>
<RangeStart value="0.0"/>
<RangeEnd value="0.0"/>
</FeatureParamsSize>
<!-- LookupCount=0 -->
</Feature>