aboutsummaryrefslogtreecommitdiff
path: root/Snippets
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2020-02-26 16:36:20 -0800
committerHaibo Huang <hhb@google.com>2020-03-05 08:43:50 -0800
commit5406a6ac31dc6e343dfd5819d6cf2c1d53f7db53 (patch)
tree37fe65d1e7556d8276ffb3aae8a825b83faabeed /Snippets
parent33b327bcebdc156e64fd6b8d5307332eb04e6f3b (diff)
downloadfonttools-5406a6ac31dc6e343dfd5819d6cf2c1d53f7db53.tar.gz
Upgrade fonttools to 4.4.1
Change-Id: Ia7f452836a390187b8732d2051f0ac7bc141a671
Diffstat (limited to 'Snippets')
-rwxr-xr-xSnippets/cmap-format.py3
-rw-r--r--Snippets/dump_woff_metadata.py1
-rw-r--r--Snippets/fix-dflt-langsys.py2
-rwxr-xr-xSnippets/interpolate.py3
-rwxr-xr-xSnippets/layout-features.py3
-rw-r--r--Snippets/merge_woff_metadata.py1
-rwxr-xr-xSnippets/otf2ttf.py3
-rwxr-xr-xSnippets/rename-fonts.py3
-rwxr-xr-xSnippets/subset-fpgm.py3
-rwxr-xr-xSnippets/svg2glif.py5
10 files changed, 9 insertions, 18 deletions
diff --git a/Snippets/cmap-format.py b/Snippets/cmap-format.py
index 0cee39c5..369df000 100755
--- a/Snippets/cmap-format.py
+++ b/Snippets/cmap-format.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Sample script to convert legacy cmap subtables to format-4
# subtables. Note that this is rarely what one needs. You
@@ -10,7 +10,6 @@
# getEncoding() of subtable and use that encoding to map the
# characters to Unicode... TODO: Extend this script to do that.
-from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._c_m_a_p import CmapSubtable
diff --git a/Snippets/dump_woff_metadata.py b/Snippets/dump_woff_metadata.py
index 0023a106..c9ea574f 100644
--- a/Snippets/dump_woff_metadata.py
+++ b/Snippets/dump_woff_metadata.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
from fontTools.ttx import makeOutputFileName
from fontTools.ttLib import TTFont
diff --git a/Snippets/fix-dflt-langsys.py b/Snippets/fix-dflt-langsys.py
index d8eccb44..c072117a 100644
--- a/Snippets/fix-dflt-langsys.py
+++ b/Snippets/fix-dflt-langsys.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import argparse
import logging
diff --git a/Snippets/interpolate.py b/Snippets/interpolate.py
index 7ed822d2..ca449854 100755
--- a/Snippets/interpolate.py
+++ b/Snippets/interpolate.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Illustrates how a fonttools script can construct variable fonts.
#
@@ -21,7 +21,6 @@
# $ ./interpolate.py && open Roboto.ttf
-from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables._n_a_m_e import NameRecord
diff --git a/Snippets/layout-features.py b/Snippets/layout-features.py
index 25522cda..60ed20d3 100755
--- a/Snippets/layout-features.py
+++ b/Snippets/layout-features.py
@@ -1,6 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
-from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
from fontTools.ttLib.tables import otTables
diff --git a/Snippets/merge_woff_metadata.py b/Snippets/merge_woff_metadata.py
index 669de461..d6e858f2 100644
--- a/Snippets/merge_woff_metadata.py
+++ b/Snippets/merge_woff_metadata.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
import sys
import os
from fontTools.ttx import makeOutputFileName
diff --git a/Snippets/otf2ttf.py b/Snippets/otf2ttf.py
index 62b4f735..a144f66e 100755
--- a/Snippets/otf2ttf.py
+++ b/Snippets/otf2ttf.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-from __future__ import print_function, division, absolute_import
+#!/usr/bin/env python3
import argparse
import logging
diff --git a/Snippets/rename-fonts.py b/Snippets/rename-fonts.py
index ddfce103..0a43dc2a 100755
--- a/Snippets/rename-fonts.py
+++ b/Snippets/rename-fonts.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""Script to add a suffix to all family names in the input font's `name` table,
and to optionally rename the output files with the given suffix.
@@ -6,7 +6,6 @@ The current family name substring is searched in the nameIDs 1, 3, 4, 6, 16,
and 21, and if found the suffix is inserted after it; or else the suffix is
appended at the end.
"""
-from __future__ import print_function, absolute_import, unicode_literals
import os
import argparse
import logging
diff --git a/Snippets/subset-fpgm.py b/Snippets/subset-fpgm.py
index c20c05fc..e242a77c 100755
--- a/Snippets/subset-fpgm.py
+++ b/Snippets/subset-fpgm.py
@@ -1,6 +1,5 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
-from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
import sys
diff --git a/Snippets/svg2glif.py b/Snippets/svg2glif.py
index aed31005..22fcc7d1 100755
--- a/Snippets/svg2glif.py
+++ b/Snippets/svg2glif.py
@@ -1,9 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
""" Convert SVG paths to UFO glyphs. """
-from __future__ import print_function, absolute_import
-__requires__ = ["FontTools", "ufoLib"]
+__requires__ = ["fontTools"]
from fontTools.misc.py23 import SimpleNamespace
from fontTools.svgLib import SVGPath