mirror of
https://github.com/rsms/inter.git
synced 2024-11-23 11:43:47 +03:00
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
@ -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:
|
||||
|
@ -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):
|
||||
|
@ -8,6 +8,7 @@ copyrightholdername: The Interface project authors
|
||||
builddir: build/tmp
|
||||
license: OFL 1.1 (SIL Open Font License, Version 1.1)
|
||||
licenseURL: http://scripts.sil.org/OFL
|
||||
italicAngle: -9.4
|
||||
|
||||
[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
|
||||
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
|
||||
uni02E5_uni02E7_uni02E5 uni02E5_uni02E9_uni02E8 uni02E9_uni02E7_uni02E5
|
||||
uni02E6_uni02E9_uni02E7 uni02E6_uni02E9_uni02E6 uni02E6_uni02E9_uni02E5
|
||||
|
Loading…
Reference in New Issue
Block a user