CFF: set FontMatrix based on unitsPerEm automatically, unless manually overridden
This commit is contained in:
parent
de1dbe5f16
commit
874c08dcd2
@ -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():
|
||||
|
@ -161,7 +161,7 @@
|
||||
<UnderlineThickness value="50"/>
|
||||
<PaintType value="0"/>
|
||||
<CharstringType value="2"/>
|
||||
<FontMatrix value="0.001 0 0 0.001 0 0"/>
|
||||
<FontMatrix value="0.0009765625 0 0 0.0009765625 0 0"/>
|
||||
<FontBBox value="100 100 500 1000"/>
|
||||
<StrokeWidth value="0"/>
|
||||
<!-- charset is dumped separately as the 'GlyphOrder' element -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user