iosMath icon indicating copy to clipboard operation
iosMath copied to clipboard

math_table_to_plist.py - Issue generating plist for STIX Two Math font

Open jsh8w opened this issue 6 years ago • 1 comments

Hello,

I'm trying to generate the .plist file for the STIX Two Math font I am using in my app. The error I am getting is:

$ python math_table_to_plist.py STIX2Math.otf STIX2Math.plist
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 18, in process_font
    accents = get_accent_attachments(math_table)
  File "math_table_to_plist.py", line 136, in get_accent_attachments
    raise "Don't know how to process device table for accent attachment."
TypeError: exceptions must be old-style classes or derived from BaseException, not str

If I remove the get_accent_attachments(math_table) call, the plist is generated correctly. However, when using MTMathUILabel's in my app, recurring decimal dots (i.e \dot) are not correctly positioned. They are left of the number they should be directly above. I presume this is due to the accent information not being included in the plist.

Any help would be appreciated.

Many thanks, James.

jsh8w avatar Feb 13 '19 17:02 jsh8w

@jsh8w I had the same issue and commented out the throw statments and added a pass there and it actually worked, built the plist just fine.

cupojoe avatar Aug 19 '19 22:08 cupojoe