Fixes broken italic (oblique) styles. The issue was that component decomposition did not happen in the correct order for some glyphs

This commit is contained in:
Rasmus Andersson 2017-08-30 19:35:06 -07:00
parent cf49a3ba7e
commit 65a7e98c76
3 changed files with 11 additions and 9 deletions

View file

@ -98,15 +98,13 @@ class FontProject:
log(">> Italicizing")
i = 0
for g in f:
i += 1
if i % 10 == 0: print g.name
if g.name == "uniFFFD":
continue
decomposeGlyph(f, g)
removeGlyphOverlap(g)
for g in f:
i += 1
if i % 10 == 0: print g.name
if g.name in self.lessItalic:
italicizeGlyph(f, g, 9, stemWidth=stemWidth,
meanYCenter=italicMeanYCenter,
@ -162,6 +160,7 @@ class FontProject:
'version': getcfg('version'),
'license': getcfg('license'),
'licenseURL': getcfg('licenseURL'),
'italicAngle': float(getcfg('italicAngle', '-12')),
})
if not self.compatible:

View file

@ -31,7 +31,8 @@ class InstanceNames:
designerURL = ""
license = ""
licenseURL = ""
italicAngle = -12
def __init__(self,names):
if type(names) == type(" "):
names = names.split("/")
@ -90,7 +91,7 @@ class InstanceNames:
f.info.macintoshFONDName = re.sub(' ','',self.longfamily) + " " + re.sub(' ','',self.longstyle)
f.info.postscriptFontName = f.info.macintoshFONDName.replace(" ", "-")
if self.italic:
f.info.italicAngle = -12.0
f.info.italicAngle = self.italicAngle
def setFLNames(self,flFont):