ToxicFrog / Ligaturizer

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

Ligaturize Mononoki doesn't work #92

Closed antoniotrkdz closed 3 years ago

antoniotrkdz commented 3 years ago

I tried to ligaturize mononoki font from debian (devuan) repo:

# apt-cache policy fonts-mononoki 
fonts-mononoki:
  Installed: 1.2-1
  Candidate: 1.2-1
  Version table:
   *** 1.2-1 500
        500 http://deb.devuan.org/merged beowulf/contrib amd64 Packages
        500 http://deb.devuan.org/merged beowulf/contrib i386 Packages
        100 /var/lib/dpkg/status

Then I placed the font into fonts folder, edited build.py and ran make as documented. I get the following error:

$ make
fontforge -lang=py -script build.py 2>&1 \
| fgrep -v 'This contextual rule applies no lookups.' \
| fgrep -v 'Bad device table'
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
Warning: Mac string is a subset of the Windows string in the 'name' table
  for the Styles (SubFamily) string in the English (US) language.
Warning: Mac string is a subset of the Windows string in the 'name' table
  for the Fullname string in the English (US) language.
Ligaturizing font mononoki-BoldItalic.ttf (mononoki) as 'Liga mononoki'
Traceback (most recent call last):
  File "build.py", line 92, in <module>
    scale_character_glyphs_threshold=SCALE_CHARACTER_GLYPHS_THRESHOLD)
  File "/home/antoniotrkdz/Ligaturizer/ligaturize.py", line 266, in ligaturize_font
    update_font_metadata(font, name)
  File "/home/antoniotrkdz/Ligaturizer/ligaturize.py", line 245, in update_font_metadata
    font.copyright += COPYRIGHT
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

Am I missing something or what?

ToxicFrog commented 3 years ago

That looks like the mononoki font doesn't have embedded copyright information, so when it tries to update it it falls over because there's nothing to update. Should be a quick patch.