$ fontknife convert -g " ! ~\$%&'()+*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " /home/user/Downloads/MxPlus_IBM_BIOS.ttf test.png
Traceback (most recent call last):
File "/home/user/Projects/Fontknife/.venv/bin/fontknife", line 8, in <module>
sys.exit(main())
File "/home/user/Projects/Fontknife/fontknife/frontend/__main__.py", line 117, in main
args.callback(font, output_path, output_kwargs)
File "/home/user/Projects/Fontknife/fontknife/frontend/commands/convert.py", line 20, in main
write_font(font, output, **output_args)
File "/home/user/Projects/Fontknife/fontknife/formats/__init__.py", line 105, in write_font
writer.write_output(font, output, **kwargs)
File "/home/user/Projects/Fontknife/fontknife/formats/writers/spritesheet.py", line 62, in write_output
paste_bbox = grid_mapper.bbox_for_sheet_index(index)
File "/home/user/Projects/Fontknife/fontknife/formats/common/spritesheet.py", line 193, in bbox_for_sheet_index
coord = self.coord_for_sheet_index(index)
File "/home/user/Projects/Fontknife/fontknife/formats/common/spritesheet.py", line 185, in coord_for_sheet_index
raise e
KeyError: 'Index 96 not in grid'
TL;DR: Font indices go OOB when writing fonts
Reported on Windows (ty @DragonMoffon) and confirmed on Linux.
Replication steps:
mainbranch from source in a fresh venvttf - Mx (mixed outline+bitmap)folder of the zipMxPlus_IBM_BIOS.ttffontknife convert -g " ! ~\$%&'()+*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\'abcdefghijklmnopqrstuvwxyz{|}~ ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " /home/user/Downloads/MxPlus_IBM_BIOS.ttf test.png