Nagwa-Limited-Community / Glyphs-MATH-Plugin

11 stars 1 forks source link

Variants data stored per master? #7

Closed jenskutilek closed 8 months ago

jenskutilek commented 1 year ago

The readme states

Glyph → Edit MATH Variants... for editing glyph-level MATH variants, assembly, and extended shape flag. The values are saved per-master and should be edited for each master.

Looking at the code, this doesn’t seem to be the case, as the values are stored in the glyph user data. Can you clarify the intended behaviour?

khaledhosny commented 11 months ago

I think the idea was to store some data per master to allow for interpolation (and font variations when the spec gets it), but I probably thought it does not make sense to store assembly data per master since they should be the same across the font and it is just much work to edit them per master (the metrics of the variants and assembly parts can change across masters, but we take it from the layer data already).

khaledhosny commented 11 months ago

So apparently the documentation is just wrong, since this data appear to have been saved in the glyph user data since the initial commit (6307fdf3fe40a481c1678794b835ced0c8e71743).

khaledhosny commented 11 months ago

Now thinking about this, I think we actually want this to be per layer, since start and end connector lengths are set explicitly and these can change across masters.

It is been over two years and I already forgot much about this code.

khaledhosny commented 8 months ago

I’m going to try to put the data in layer, and migrate it from glyph if it is there when the font is opened to not break existing projects.

khaledhosny commented 8 months ago

Thinking about this again, I think variants should be kept per glyph, only assemblies need per-layer data (the start and end connector lengths). I think also we will need to interpolate them, like #14.

khaledhosny commented 8 months ago

Now only assemblies are per layer, but I haven’t done the interpolation bit.