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:
parent
cf49a3ba7e
commit
65a7e98c76
3 changed files with 11 additions and 9 deletions
|
|
@ -98,15 +98,13 @@ class FontProject:
|
||||||
log(">> Italicizing")
|
log(">> Italicizing")
|
||||||
i = 0
|
i = 0
|
||||||
for g in f:
|
for g in f:
|
||||||
i += 1
|
|
||||||
if i % 10 == 0: print g.name
|
|
||||||
|
|
||||||
if g.name == "uniFFFD":
|
|
||||||
continue
|
|
||||||
|
|
||||||
decomposeGlyph(f, g)
|
decomposeGlyph(f, g)
|
||||||
removeGlyphOverlap(g)
|
removeGlyphOverlap(g)
|
||||||
|
|
||||||
|
for g in f:
|
||||||
|
i += 1
|
||||||
|
if i % 10 == 0: print g.name
|
||||||
|
|
||||||
if g.name in self.lessItalic:
|
if g.name in self.lessItalic:
|
||||||
italicizeGlyph(f, g, 9, stemWidth=stemWidth,
|
italicizeGlyph(f, g, 9, stemWidth=stemWidth,
|
||||||
meanYCenter=italicMeanYCenter,
|
meanYCenter=italicMeanYCenter,
|
||||||
|
|
@ -162,6 +160,7 @@ class FontProject:
|
||||||
'version': getcfg('version'),
|
'version': getcfg('version'),
|
||||||
'license': getcfg('license'),
|
'license': getcfg('license'),
|
||||||
'licenseURL': getcfg('licenseURL'),
|
'licenseURL': getcfg('licenseURL'),
|
||||||
|
'italicAngle': float(getcfg('italicAngle', '-12')),
|
||||||
})
|
})
|
||||||
|
|
||||||
if not self.compatible:
|
if not self.compatible:
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,8 @@ class InstanceNames:
|
||||||
designerURL = ""
|
designerURL = ""
|
||||||
license = ""
|
license = ""
|
||||||
licenseURL = ""
|
licenseURL = ""
|
||||||
|
italicAngle = -12
|
||||||
|
|
||||||
def __init__(self,names):
|
def __init__(self,names):
|
||||||
if type(names) == type(" "):
|
if type(names) == type(" "):
|
||||||
names = names.split("/")
|
names = names.split("/")
|
||||||
|
|
@ -90,7 +91,7 @@ class InstanceNames:
|
||||||
f.info.macintoshFONDName = re.sub(' ','',self.longfamily) + " " + re.sub(' ','',self.longstyle)
|
f.info.macintoshFONDName = re.sub(' ','',self.longfamily) + " " + re.sub(' ','',self.longstyle)
|
||||||
f.info.postscriptFontName = f.info.macintoshFONDName.replace(" ", "-")
|
f.info.postscriptFontName = f.info.macintoshFONDName.replace(" ", "-")
|
||||||
if self.italic:
|
if self.italic:
|
||||||
f.info.italicAngle = -12.0
|
f.info.italicAngle = self.italicAngle
|
||||||
|
|
||||||
|
|
||||||
def setFLNames(self,flFont):
|
def setFLNames(self,flFont):
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ copyrightholdername: The Interface project authors
|
||||||
builddir: build/tmp
|
builddir: build/tmp
|
||||||
license: OFL 1.1 (SIL Open Font License, Version 1.1)
|
license: OFL 1.1 (SIL Open Font License, Version 1.1)
|
||||||
licenseURL: http://scripts.sil.org/OFL
|
licenseURL: http://scripts.sil.org/OFL
|
||||||
|
italicAngle: -9.4
|
||||||
|
|
||||||
[res]
|
[res]
|
||||||
|
|
||||||
|
|
@ -62,7 +63,8 @@ lessitalic: dagger daggerdbl plusminus dollar florin quotesingle quotedbl tilde
|
||||||
acute grave dieresis macron breve bar sum integral product s e c o v x V X W
|
acute grave dieresis macron breve bar sum integral product s e c o v x V X W
|
||||||
copyright registered ogonek two six nine seven three five uni0431
|
copyright registered ogonek two six nine seven three five uni0431
|
||||||
|
|
||||||
noitalic: .notdef uni02E9_uni02E7_uni02E6 uni02E5_uni02E7_uni02E8 uni02E5_uni02E7_uni02E9
|
noitalic: .notdef uniFFFD
|
||||||
|
uni02E9_uni02E7_uni02E6 uni02E5_uni02E7_uni02E8 uni02E5_uni02E7_uni02E9
|
||||||
uni02E9_uni02E5_uni02E5 uni02E5_uni02E7_uni02E6 uni02E5_uni02E7_uni02E7
|
uni02E9_uni02E5_uni02E5 uni02E5_uni02E7_uni02E6 uni02E5_uni02E7_uni02E7
|
||||||
uni02E5_uni02E7_uni02E5 uni02E5_uni02E9_uni02E8 uni02E9_uni02E7_uni02E5
|
uni02E5_uni02E7_uni02E5 uni02E5_uni02E9_uni02E8 uni02E9_uni02E7_uni02E5
|
||||||
uni02E6_uni02E9_uni02E7 uni02E6_uni02E9_uni02E6 uni02E6_uni02E9_uni02E5
|
uni02E6_uni02E9_uni02E7 uni02E6_uni02E9_uni02E6 uni02E6_uni02E9_uni02E5
|
||||||
|
|
|
||||||
Reference in a new issue