From 2b01dfbdd3b5282b7db7d495517086ddb364a0a2 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Sat, 17 Feb 2018 20:18:43 -0800 Subject: ufocompile: change magic italicMeanYCenter from -825 to -600 that in tests yields a better glyph box adjustment for all weights (slightly shifts glyphs to the right) --- misc/ufocompile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'misc/ufocompile') diff --git a/misc/ufocompile b/misc/ufocompile index e63f93739..e750acad0 100755 --- a/misc/ufocompile +++ b/misc/ufocompile @@ -163,7 +163,9 @@ def main(): # # scaleX controls scale on the x axis, used for italics. 1.0 means no scaling. # italicMeanYCenter controls how far on the x axis the glyph should slide - # to compensate for the slant. + # to compensate for the slant. -600 is sort of a magic number arrived to by + # trial and error. + # if ALL or 'regular' in styles: handledStyles.append('regular') @@ -174,7 +176,7 @@ def main(): handledStyles.append('italic') proj.generateFont( rg.font, "%s/Italic/Italic/Rg" % FAMILYNAME, - italic=True, stemWidth=232, italicMeanYCenter=-825, + italic=True, stemWidth=232, italicMeanYCenter=-600, panose=mkpanose(5)) @@ -190,7 +192,7 @@ def main(): proj.generateFont( Mix2([rg, bl], 0.32, glyphSpecializations.get('medium', {})), "%s/Medium Italic/Italic/Me" % FAMILYNAME, - italic=True, stemWidth=300, italicMeanYCenter=-825, + italic=True, stemWidth=300, italicMeanYCenter=-600, panose=mkpanose(6)) @@ -206,7 +208,7 @@ def main(): proj.generateFont( Mix2([rg, bl], 0.68, glyphSpecializations.get('bold', {})), "%s/Bold Italic/Bold Italic/Rg" % FAMILYNAME, - italic=True, stemWidth=350, italicMeanYCenter=-825, + italic=True, stemWidth=350, italicMeanYCenter=-600, panose=mkpanose(8)) @@ -219,7 +221,7 @@ def main(): handledStyles.append('blackitalic') proj.generateFont( bl.font, "%s/Black Italic/Italic/Bl" % FAMILYNAME, - italic=True, stemWidth=400, italicMeanYCenter=-825, + italic=True, stemWidth=400, italicMeanYCenter=-600, panose=mkpanose(9)) # generate TTFs -- cgit v1.2.3