diff --git a/Lib/fontTools/fontBuilder.py b/Lib/fontTools/fontBuilder.py index bfde5b25e..8b6b76387 100644 --- a/Lib/fontTools/fontBuilder.py +++ b/Lib/fontTools/fontBuilder.py @@ -478,6 +478,9 @@ class FontBuilder(object): topDict.Private = private for key, value in fontInfo.items(): setattr(topDict, key, value) + if "FontMatrix" not in fontInfo: + scale = 1 / self.font["head"].unitsPerEm + topDict.FontMatrix = [scale, 0, 0, scale, 0, 0] charStrings = CharStrings(None, topDict.charset, globalSubrs, private, fdSelect, fdArray) for glypnName, charString in charStringsDict.items(): diff --git a/Tests/fontBuilder/data/test.otf.ttx b/Tests/fontBuilder/data/test.otf.ttx index 4a4434a48..0b7279469 100644 --- a/Tests/fontBuilder/data/test.otf.ttx +++ b/Tests/fontBuilder/data/test.otf.ttx @@ -161,7 +161,7 @@ - +