From 941d73576004eb1ff93b38fe7d6e511af3f428b3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 8 Dec 2015 22:22:33 +0100 Subject: [PATCH] Sanity-check ValueRecord fields --- fd2ft.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fd2ft.py b/fd2ft.py index 9e80b47fa..8789c32e8 100755 --- a/fd2ft.py +++ b/fd2ft.py @@ -9,7 +9,7 @@ from __future__ import print_function, division, absolute_import from fontTools import ttLib from fontTools.ttLib.tables import otTables as ot -from fontTools.ttLib.tables.otBase import ValueRecord +from fontTools.ttLib.tables.otBase import ValueRecord, valueRecordFormatDict import re debug = print @@ -149,6 +149,7 @@ def parseSinglePos(self, lines, font): for line in lines: assert len(line) == 3, line w = line[0].title().replace(' ', '') + assert w in valueRecordFormatDict g = parseGlyph(line[1]) v = int(line[2]) if g not in values: