Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathGlyph: Variable fonts loose carefully prepared stacked nodes #232

Closed
kateliev opened this issue Mar 30, 2021 · 4 comments
Closed

MathGlyph: Variable fonts loose carefully prepared stacked nodes #232

kateliev opened this issue Mar 30, 2021 · 4 comments

Comments

@kateliev
Copy link

Hi fontMath team. I am having trouble with a variable font project that uses stacked nodes to keep compatibility across masters. Tracing the root of the problem I have arrived here. I've also heard colleagues complaining about facing similar issues with their projects. Fiddling with the code I think I have found a civilized solution and I am offering it to you.

Fix utilizes simple name/tag technique to sort out the newly introduced nodes from MathGlyphPen, thus leaving stacked nodes intentionally made by the type designer alone.

Problem first referred here: LettError/ufoProcessor#35
I believe my issue is similar to: #127
Please see the attached code: mathGlyph.zip

@typemytype
Copy link
Member

He Vassil

thanks for the proposal!

but I think it better to keep the current implementation and add a strict mode.

Strict mode would mean it fails whenever two glyphs are different in structure (contour compatibility), component, anchor, guidelines and other glyph attributes must also be compatible (like the current implementation)

glyph structures are the same when:

  • both glyphs have the same amount of contours
  • contours has the same amount of points
  • contours have the same points sequences, order of on/off curves

I believe this would also fix your issue.

@LettError
Copy link
Member

WIP, but here's a start 149b1c8

  • Add strict flag to MathGlyphPen. This suppresses adding on-point offcurves for line segments.
  • Add strict flag to MathGlyph object.
  • Add strict version of outline tests.

I need to do some more tests.

@kateliev
Copy link
Author

kateliev commented Apr 2, 2021

Hey, thank you will give it a try right away :)

@benkiel
Copy link
Member

benkiel commented Jun 22, 2021

Closed by #235

@benkiel benkiel closed this as completed Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants