[cantarell-fonts/respacing] Autohint CFF2 font



commit cc81bd16b13adf72bc44d4852a1c7dfd25fcff9d
Author: Nikolaus Waxweiler <madigens gmail com>
Date:   Wed Jan 1 21:31:19 2020 +0100

    Autohint CFF2 font

 proofs/test.html              |  2 +-
 scripts/make-variable-font.py | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/proofs/test.html b/proofs/test.html
index 87704e8a..e8beedfe 100644
--- a/proofs/test.html
+++ b/proofs/test.html
@@ -8,7 +8,7 @@
   <style type="text/css">
     @font-face {
       font-family: "Cantarell VF";
-      src: url("/tmp/Cantarell-VF.ttf");
+      src: url("/tmp/Cantarell-VF.otf");
     }
 
     body {
diff --git a/scripts/make-variable-font.py b/scripts/make-variable-font.py
index 38079229..4b70b9c5 100644
--- a/scripts/make-variable-font.py
+++ b/scripts/make-variable-font.py
@@ -6,6 +6,7 @@
 # sequentially.
 
 import argparse
+import subprocess
 from pathlib import Path
 
 import fontTools.designspaceLib
@@ -22,12 +23,16 @@ parser.add_argument(
 parser.add_argument(
     "stylespace_path", type=Path, help="The path to the Stylespace file."
 )
+parser.add_argument(
+    "psautohint_path", type=Path, help="The path to psautohint."
+)
 parser.add_argument("output_path", type=Path, help="The variable TTF output path.")
 args = parser.parse_args()
 
 designspace_path = args.designspace_path.resolve()
 stylespace_path = args.stylespace_path.resolve()
 output_path = args.output_path.resolve()
+psautohint_path = args.psautohint_path.resolve()
 
 
 # 1. Load Designspace and filter out instances that are marked as non-exportable.
@@ -45,5 +50,8 @@ varfont = ufo2ft.compileVariableCFF2(designspace, inplace=True)
 stylespace = statmake.classes.Stylespace.from_file(stylespace_path)
 statmake.lib.apply_stylespace_to_variable_font(stylespace, varfont, {})
 
-
+# External tools after this point.
 varfont.save(output_path)
+
+# 4. Autohint
+subprocess.run([psautohint_path, str(output_path)])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]