Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Update generate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jipi-dev committed Sep 15, 2023
1 parent 345b778 commit 918ee83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/engines/fontforge/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import json
from subprocess import call
from distutils.spawn import find_executable
from shutil import which

args = json.load(sys.stdin)

Expand Down Expand Up @@ -60,7 +60,7 @@ def create_empty_char(f, c):
create_empty_char(f, char)
glyph = f.createChar(cp, name)
glyph.addPosSub('liga', tuple(name))

else:
glyph = f.createChar(cp)
glyph.importOutlines(filePath)
Expand Down Expand Up @@ -94,7 +94,7 @@ def generate(filename):

# Hint the TTF file
# ttfautohint is optional
if (find_executable('ttfautohint') and args['autoHint']):
if (which('ttfautohint') and args['autoHint']):
call('ttfautohint --symbol --fallback-script=latn --no-info "%(font)s.ttf" "%(font)s-hinted.ttf" && mv "%(font)s-hinted.ttf" "%(font)s.ttf"' % {'font': fontfile}, shell=True)
f = fontforge.open(fontfile + '.ttf')

Expand Down

0 comments on commit 918ee83

Please sign in to comment.