From 79c2b8cbc19ec86a19607705613fe206c56cc0b7 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 8 Dec 2015 10:11:26 +0000 Subject: [PATCH] ttx: pad tags with space if length is less than 4 so that you don't need to do `-t "CFF "` anymore. Fixes https://github.com/behdad/fonttools/issues/265 --- Lib/fontTools/ttx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/fontTools/ttx.py b/Lib/fontTools/ttx.py index 675f133ef..01ca63984 100644 --- a/Lib/fontTools/ttx.py +++ b/Lib/fontTools/ttx.py @@ -155,6 +155,8 @@ class Options(object): elif option == "-l": self.listTables = True elif option == "-t": + # pad with space if table tag length is less than 4 + value += " " * (4 - len(value)) self.onlyTables.append(value) elif option == "-x": self.skipTables.append(value)