mirror of
https://github.com/ToxicFrog/Ligaturizer.git
synced 2024-10-26 11:10:27 +03:00
Die explicitly if running on python != 2
This should hopefully cut down on bug reports from people stuck with a Fontforge install that's linked against Python 3, which doesn't work, c.f. #6.
This commit is contained in:
parent
04eb004456
commit
107a135207
@ -24,6 +24,16 @@ 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):
|
||||
for weight in ['Bold', 'Retina', 'Medium', 'Regular', 'Light']:
|
||||
if fontname.endswith('-' + weight):
|
||||
|
Loading…
Reference in New Issue
Block a user