From d0aaf1bceb5ebee4a12fcf7c3a57cf7f9bed7a49 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 24 Mar 2021 08:04:14 -0700 Subject: [PATCH] [feaLib] Set RangeStart/RangeEnd as float Fixes the one failing test after previous commit. --- Lib/fontTools/feaLib/parser.py | 4 ++-- Tests/feaLib/builder_test.py | 2 +- Tests/feaLib/data/size2.ttx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Lib/fontTools/feaLib/parser.py b/Lib/fontTools/feaLib/parser.py index c248c3409..04e8bfb76 100644 --- a/Lib/fontTools/feaLib/parser.py +++ b/Lib/fontTools/feaLib/parser.py @@ -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_() diff --git a/Tests/feaLib/builder_test.py b/Tests/feaLib/builder_test.py index 35bbab9a1..2567a74c4 100644 --- a/Tests/feaLib/builder_test.py +++ b/Tests/feaLib/builder_test.py @@ -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'): diff --git a/Tests/feaLib/data/size2.ttx b/Tests/feaLib/data/size2.ttx index a822af364..1a12ddfc7 100644 --- a/Tests/feaLib/data/size2.ttx +++ b/Tests/feaLib/data/size2.ttx @@ -26,8 +26,8 @@ - - + +