ToxicFrog / Ligaturizer

Programming Fonts with Ligatures added (& a script to add them to other fonts)
GNU General Public License v3.0
2.19k stars 112 forks source link

Python errors upon trying to ligaturize a custom font. #21

Closed adg-adg closed 6 years ago

adg-adg commented 6 years ago

So, I'm following all of the instruction in the readme. I'm using debian therefore I installed the packages fontforge and python-fontforge. I put in my .ttf fonts into input-fonts dir as specified and run make, and this is the output I get:

Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Based on sources from 11:21 UTC 24-Sep-2017-ML-D.
 Based on source from git with hash: 
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
  Ignoring 'TTFA'
Reading ligatures from fira/FiraCode-Bold.otf
Traceback (most recent call last):
  File "ligaturize.py", line 289, in <module>
    creator = LigatureCreator(font, firacode, args)
  File "ligaturize.py", line 78, in __init__
    self.emwidth = self.font['m'].width
TypeError: No such glyph

Not sure what to make of it. I didn't modify the ligaturize.py in any way.

ToxicFrog commented 6 years ago

This is another manifestation of #16 -- the font you're trying to patch doesn't have a glyph name table, just codepoints. This post has a workaround and I should hopefully have a fix out later this week.