Use Python 3

The scripts work with Python 3 now (with a few changes).
Remove Python 2 requirement.
This commit is contained in:
Navid Rojiani 2019-06-30 19:54:48 -04:00 committed by B. Kelly
parent bc6c629db3
commit daa4dc8baf
3 changed files with 1 additions and 15 deletions

View File

@ -90,7 +90,7 @@ for pattern in prefixed_fonts:
copy_character_glyphs=COPY_CHARACTER_GLYPHS,
scale_character_glyphs_threshold=SCALE_CHARACTER_GLYPHS_THRESHOLD)
for pattern,name in renamed_fonts.iteritems():
for pattern,name in renamed_fonts.items():
files = glob(pattern)
if not files:
print("Error: pattern '%s' didn't match any files." % pattern)

View File

@ -9,8 +9,6 @@
#
# See ligatures.py for a list of all the ligatures that will be copied.
from __future__ import print_function
import fontforge
import psMat
import os
@ -24,16 +22,6 @@ COPYRIGHT = '''
Programming ligatures added by Ilya Skriblovsky from FiraCode
FiraCode Copyright (c) 2015 by Nikita Prokopov'''
VERSION_MISMATCH = '''
Ligaturizer only supports Python 2.x due to a bug in Fontforge:
https://github.com/fontforge/fontforge/issues/3057
You will need to install Fontforge for Python 2 to use this script.
'''
if sys.version_info[0] != 2:
print(VERSION_MISMATCH)
sys.exit(1)
def get_ligature_source(fontname):
# Become case-insensitive
fontname = fontname.lower()

View File

@ -9,8 +9,6 @@
#
# See ligatures.py for a list of all the ligatures that will be copied.
from __future__ import print_function
import fontforge
import os
from os import path