diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-02-18 07:18:43 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-02-18 07:18:43 +0300 |
commit | 2b01dfbdd3b5282b7db7d495517086ddb364a0a2 (patch) | |
tree | 99340a0636f48bd5f39e4159638df5c044745787 | |
parent | 34a5d1b31f99eb6be442be22964728b075b2c7c5 (diff) | |
download | inter-2b01dfbdd3b5282b7db7d495517086ddb364a0a2.tar.xz |
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)
-rwxr-xr-x | misc/ufocompile | 12 |
1 files changed, 7 insertions, 5 deletions
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 |