summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2019-09-04 05:35:42 +0300
committerRasmus Andersson <rasmus@notion.se>2019-09-04 05:35:42 +0300
commit806452ab7f26f69550b61e05e72b2d6f49c716c0 (patch)
tree6603a235c132b0f729d70505ab4e54fcb199a24a
parent12d43b99a62c0acec6fc37c576fadca9d08002b3 (diff)
downloadinter-806452ab7f26f69550b61e05e72b2d6f49c716c0.tar.xz
upgrade fonttools and fontmake
-rwxr-xr-xmisc/fontbuild15
-rw-r--r--requirements.txt16
2 files changed, 19 insertions, 12 deletions
diff --git a/misc/fontbuild b/misc/fontbuild
index 58ce34e73..6ee3f8fdc 100755
--- a/misc/fontbuild
+++ b/misc/fontbuild
@@ -125,6 +125,7 @@ class VarFontProject(FontProject):
self._deep_copy_contours(ufo, glyph, glyph, Transform())
glyph.clearComponents()
+
def _deep_copy_contours(self, ufo, parent, component, transformation):
"""Copy contours from component to parent, including nested components."""
for nested in component.components:
@@ -150,13 +151,12 @@ class VarFontProject(FontProject):
conversion_error=None,
feature_writers=None,
cff_round_tolerance=None,
- **kwargs
+ **kwargs,
):
- """Build OpenType binaries with interpolatable outlines."""
# We decompose any glyph with reflected components to make sure
# that fontTools varLib is able to produce properly-slanting interpolation.
- self._load_designspace_sources(designspace)
+ designspace = self._load_designspace_sources(designspace)
decomposeGlyphs = set()
removeOverlapsGlyphs = set()
@@ -199,6 +199,7 @@ class VarFontProject(FontProject):
)
rmoverlapFilter.filter(g)
+
if ttf:
return ufo2ft.compileInterpolatableTTFsFromDS(
designspace,
@@ -416,12 +417,15 @@ class Main(object):
# decide output filename (or check user-provided name)
outfilename = args.output
+ outformat = 'variable' # TTF
if outfilename is None or outfilename == '':
outfilename = os.path.splitext(basename(args.srcfile))[0] + '.var.ttf'
log.info('setting --output %r' % outfilename)
else:
outfileext = os.path.splitext(outfilename)[1]
- if outfileext.lower() != '.ttf':
+ if outfileext.lower() == '.otf':
+ outformat = 'variable-cff2'
+ elif outfileext.lower() != '.ttf':
fatal('Invalid file extension %r (expected ".ttf")' % outfileext)
mkdirs(dirname(outfilename))
@@ -439,7 +443,8 @@ class Main(object):
use_production_names=True,
round_instances=True,
output_path=outfilename,
- output=['variable'],
+ output=[outformat],
+ optimize_cff=CFFOptimization.SUBROUTINIZE,
overlaps_backend='pathops', # use Skia's pathops
)
diff --git a/requirements.txt b/requirements.txt
index 84e08eacf..d38126b86 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,13 +1,15 @@
-fonttools[lxml,unicode,ufo]==3.41.0
-glyphsLib==3.3.1
+# note: These should match requirements of fontmake
+
+fontmake==2.0.1
+fonttools[lxml,unicode,ufo]==3.44.0
+glyphsLib==4.1.2
skia-pathops==0.2.0.post2
-ufo2ft==2.8.0
-fontmake==1.9.3
-fs==2.3.0
+ufo2ft==2.9.1
+fs==2.4.10
# for fontTools/varLib/interpolatable.py
-numpy==1.16.3
-scipy==1.3.0
+numpy==1.17.1
+scipy==1.3.1
munkres==1.1.2
# for woff2