summaryrefslogtreecommitdiff
path: root/misc/fontbuild
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2019-10-24 04:44:33 +0300
committerRasmus Andersson <rasmus@notion.se>2019-10-24 04:44:33 +0300
commit0ea81677797e2f4df5e514b791c96feb40318756 (patch)
tree06e625a5703d416c277b6ced229d59e2aa202f93 /misc/fontbuild
parent51781961e3213be3d2dd104457ecbb5f2eaa9daa (diff)
downloadinter-0ea81677797e2f4df5e514b791c96feb40318756.tar.xz
change fontbuild rename command to apply Google Fonts standard style names with --google-style flag (replaces flag --compact-style)
Diffstat (limited to 'misc/fontbuild')
-rwxr-xr-xmisc/fontbuild13
1 files changed, 8 insertions, 5 deletions
diff --git a/misc/fontbuild b/misc/fontbuild
index 61b599067..3b65def94 100755
--- a/misc/fontbuild
+++ b/misc/fontbuild
@@ -22,7 +22,7 @@ from glyphsLib.interpolation import apply_instance_data
from fontbuildlib import FontBuilder
from fontbuildlib.util import mkdirs, loadTTFont
from fontbuildlib.info import setFontInfo, updateFontVersion
-from fontbuildlib.name import setFamilyName, removeWhitespaceFromStyles
+from fontbuildlib.name import setFamilyName, renameStylesGoogleFonts
log = logging.getLogger(__name__)
@@ -581,10 +581,13 @@ class Main(object):
a('-o', '--output', metavar='<file>',
help='Output font file. Defaults to input file (overwrite.)')
+
a('--family', metavar='<name>',
help='Rename family to <name>')
- a('--compact-style', action='store_true',
- help='Rename style names to CamelCase. e.g. "Extra Bold Italic" -> "ExtraBoldItalic"')
+
+ a('--google-style', action='store_true',
+ help='Rename style names to Google Fonts standards.')
+
a('input', metavar='<file>',
help='Input font file')
@@ -600,9 +603,9 @@ class Main(object):
editCount += 1
setFamilyName(font, args.family)
- if args.compact_style:
+ if args.google_style:
editCount += 1
- removeWhitespaceFromStyles(font)
+ renameStylesGoogleFonts(font)
if editCount == 0:
print("no rename options provided", file=sys.stderr)