Nagwa-Limited-Community / Glyphs-MATH-Plugin

11 stars 1 forks source link

Math Constants not in font on export from MM file #14

Closed jenskutilek closed 8 months ago

jenskutilek commented 8 months ago

Are you using this plugin with single master glyphs files, or also multiple master?

I've tried to export fonts from a MM source file, and ots is complaining about a bad offset in the table:

MATH: bad offset in MATH header ERROR: Table discarded

It seems that when the instance is interpolated and passed to the build_ method, the userData for math constants is not part of the instance userData. So the constants never get written to the font, and the offset to the math constants in the MATH table header is 0, generating the error in ots.

In #13 I've tried to interpolate the constants and pass them to build_, but I haven't checked if this breaks working with single master sources.

jenskutilek commented 8 months ago

I've cleaned up my code and also tested with a single-master source. It seems to work ok.

khaledhosny commented 8 months ago

I’m currently using it on a single master project, but previously I was using it on a two master project (but building static instances only, since MATH table does not support variation), so may be some code bitrot in the meantime.