summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2017-08-25 04:27:00 +0300
committerRasmus Andersson <rasmus@notion.se>2017-08-25 04:27:00 +0300
commite77a1a132cb8607c4454ea80f91b5062c9cacfda (patch)
tree5b0cd2ad8af80f83a6aa93efe198913d5c65427a /misc
parent75c7a08620d6811b3d4b8297dba80725094ad768 (diff)
downloadinter-e77a1a132cb8607c4454ea80f91b5062c9cacfda.tar.xz
tnum, zero, ss01, latin1-extended, etc
- Tabular numbers feature - Slashed zero feature - Stylistic set 1 feature (open numbers) - Combination glyphs for the above feature intersections - Improved Latin-1 extended glyph set - Kerning improvements for numbers - Lots of anchor improvements - Fixes "Medium seems to be same as Regular" issue on Windows
Diffstat (limited to 'misc')
-rw-r--r--misc/pylib/fontbuild/Build.py18
-rwxr-xr-xmisc/ufocompile30
2 files changed, 21 insertions, 27 deletions
diff --git a/misc/pylib/fontbuild/Build.py b/misc/pylib/fontbuild/Build.py
index 5046f9f91..326cb67fd 100644
--- a/misc/pylib/fontbuild/Build.py
+++ b/misc/pylib/fontbuild/Build.py
@@ -88,8 +88,8 @@ class FontProject:
n = names.split("/")
log("---------------------\n%s %s\n----------------------" %(n[0],n[1]))
- log(">> Mixing masters")
if isinstance( mix, Mix):
+ log(">> Mixing masters")
f = mix.generateFont(self.basefont)
else:
f = mix.copy()
@@ -133,15 +133,15 @@ class FontProject:
log(">> Generating glyphs")
generateGlyphs(f, self.diacriticList, self.adobeGlyphList)
- log(">> Copying features")
- readFeatureFile(f, self.basefont.features.text)
+ # log(">> Reading features")
+ # readFeatureFile(f, f.features.text)
log(">> Decomposing")
- for g in f:
- if len(g.components) > 0:
- decomposeGlyph(f, g)
- # for gname in self.decompose:
- # if f.has_key(gname):
- # decomposeGlyph(f, f[gname])
+ # for g in f:
+ # if len(g.components) > 0:
+ # decomposeGlyph(f, g)
+ for gname in self.decompose:
+ if f.has_key(gname):
+ decomposeGlyph(f, f[gname])
copyrightHolderName = ''
if self.config.has_option('main', 'copyrightHolderName'):
diff --git a/misc/ufocompile b/misc/ufocompile
index 2f84593c4..ab2ca777e 100755
--- a/misc/ufocompile
+++ b/misc/ufocompile
@@ -5,6 +5,7 @@ import argparse
import logging
import subprocess
+from shutil import copyfile
from robofab.objects.objectsRF import RPoint
from robofab.world import OpenFont
from fontbuild.Build import FontProject
@@ -86,17 +87,20 @@ ALL = len(styles) == 0
# version control tag, if any
buildTag = readVersionControlTag(BASEDIR)
+# Since we reference a shared feature file, copy it to build dir so includes works
+copyfile(
+ os.path.join(srcDir, 'features.fea'),
+ os.path.join(args.out, 'InterfaceUFO', 'features.fea'))
+
# Load masters
+print('loading master: Regular')
rg = Master("%s/src/Interface-Regular.ufo" % BASEDIR)
bd = None
if ALL or 'bold' in styles or 'bolditalic' in styles or 'medium' in styles or 'mediumitalic' in styles:
+ print('loading master: Bold')
bd = Master("%s/src/Interface-Bold.ufo" % BASEDIR)
-# th = None
-# thFont = None
-# if ALL or 'thin' in styles or 'thinitalic' in styles or 'light' in styles or 'lightitalic' in styles:
-# th = Master("%s/src/Interface-Thin.ufo" % BASEDIR)
glyphSpecializations = extractSpecializedGlyphs(rg)
@@ -114,13 +118,14 @@ class Mix2(Mix):
return specializedGlyph
return Mix.mixGlyphs(self, gname)
-
proj = FontProject(rg.font, BASEDIR, os.path.join(srcDir,'fontbuild.cfg'), buildTag=buildTag)
proj.builddir = args.out
+
if args.otf:
proj.buildOTF = True
+# name syntax: family/longstyle/shortstyle/subfamilyAbbrev
if ALL or 'regular' in styles:
proj.generateFont(rg.font, "%s/Regular/Regular/Rg" % FAMILYNAME)
@@ -132,12 +137,12 @@ if ALL or 'regularitalic' in styles:
if ALL or 'medium' in styles:
proj.generateFont(
Mix2([rg, bd], 0.35, glyphSpecializations['medium']),
- "%s/Medium/Regular/Rg" % FAMILYNAME)
+ "%s/Medium/Regular/Lt" % FAMILYNAME)
if ALL or 'mediumitalic' in styles:
proj.generateFont(
Mix2([rg, bd], 0.35, glyphSpecializations['medium']),
- "%s/Medium Italic/Italic/Rg" % FAMILYNAME,
+ "%s/Medium Italic/Italic/Lt" % FAMILYNAME,
italic=True, stemWidth=256, italicMeanYCenter=-825, italicNarrowAmount=1)
if ALL or 'bold' in styles:
@@ -147,17 +152,6 @@ if ALL or 'bolditalic' in styles:
proj.generateFont(bd.font, "%s/Bold Italic/Bold Italic/Rg" % FAMILYNAME,
italic=True, stemWidth=290, italicMeanYCenter=-825, italicNarrowAmount=1)
-# if ALL or 'light' in styles:
-# proj.generateFont(Mix([th, rg], 0.45), "%s/Light/Regular/Lt" % FAMILYNAME)
-
-# if ALL or 'lightitalic' in styles:
-# proj.generateFont(rgFont, "%s/Light Italic/Italic/Lt" % FAMILYNAME,
-# italic=True, stemWidth=120)
-
-# proj.generateFont(th.font, "%s/Thin/Regular/Th" % FAMILYNAME)
-# proj.generateFont(th.font, "%s/Thin Italic/Italic/Th" % FAMILYNAME,
-# italic=True, stemWidth=80)
-
# generate TTFs
if args.no_ttf == False:
proj.generateTTFs()