Skip to content

Problem generating plist for font #114

Description

@kekearif

Hey, I'm tying to add my own custom font. However I am having issues using the included script to generate a plist. How do you generate the plist?

I tried to generate the plist first with the included font file (just for testing purposes) latinmodern-math.otf. I did the following steps:

  • First convert to ttx using ttx latinmodern-math.otf in the terminal from the Python fonttools library.
  • I then run the script included in the repo to try and generate a plist python math_table_to_plist.py latinmodern-math.ttx latinmodern-math.plist

However when I run the script I get the following error:

Traceback (most recent call last):
  File "math_table_to_plist.py", line 203, in <module>
    main()
  File "math_table_to_plist.py", line 200, in main
    process_font(font_file, plist_file)
  File "math_table_to_plist.py", line 11, in process_font
    font = TTFont(font_file)
  File "/Users/kekearif/Desktop/font/lib/python2.7/site-packages/fontTools/ttLib/ttFont.py", line 140, in __init__
    self.reader = SFNTReader(file, checkChecksums, fontNumber=fontNumber)
  File "/Users/kekearif/Desktop/font/lib/python2.7/site-packages/fontTools/ttLib/sfnt.py", line 81, in __init__
    raise TTLibError("Not a TrueType or OpenType font (bad sfntVersion)")
fontTools.ttLib.TTLibError: Not a TrueType or OpenType font (bad sfntVersion)

Any idea what I am doing wrong where and why I am getting this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions