1
1
mirror of https://github.com/i-tu/Hasklig.git synced 2024-08-15 21:40:42 +03:00

No need to check FontTools version anymore

This commit is contained in:
Miguel Sousa 2017-07-25 23:03:39 -07:00
parent ca967a4924
commit 4849d25c98

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python
#!/usr/bin/env python
"""
Adds an SVG table to a TTF or OTF font.
@ -8,7 +8,6 @@ The file names of the SVG glyphs need to match their corresponding glyph final n
import os
import sys
import re
from distutils.version import StrictVersion
try:
from fontTools import ttLib, version
@ -16,16 +15,6 @@ except ImportError:
print >> sys.stderr, "ERROR: FontTools Python module is not installed."
sys.exit(1)
# support for the SVG table was added to FontTools on Aug 28, 2013
# https://github.com/behdad/fonttools/commit/ddcca79308b52dc36b24ef94cab4ab00c8e32376
minFontToolsVersion = '2.5'
if StrictVersion(version) < StrictVersion(minFontToolsVersion):
print >> sys.stderr, "ERROR: The FontTools module version must be %s or higher.\n\
You have version %s installed.\n\
Get the latest version at https://github.com/behdad/fonttools" % (minFontToolsVersion, version)
sys.exit(1)
TABLE_TAG = 'SVG '
# Regexp patterns