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

Fix variable anchors when DesignSpace source specifies a layer #842

Merged
merged 2 commits into from
May 21, 2024

Conversation

khaledhosny
Copy link
Collaborator

The anchor position was always taken from the default layer, ignoring the specified layerName.

The anchor position was always taken from the default layer, ignoring
the specified layerName.
The DesignSpace document has a source that uses Medium layer, but before
the previous fix the anchor position was taken from the default layer.
@anthrotype
Copy link
Member

good catch! this is basically the continuation of #840 but for the sparse UFO layers

@khaledhosny can you please also test that my assumption in googlefonts/fontmake#1090 (comment) is true?

@anthrotype
Copy link
Member

can you please also test that my assumption in googlefonts/fontmake#1090 (comment) is true?

I just tried to remove the anchor "top" from the intermediate glyph "e" in the LayerFont.ufo's "Medium" layer used for the VF integration tests and indeed the intermediate glyph is skipped when producing the mark2base lookup.

  feature mark {
      lookup mark2base {
          pos base e
-             <anchor (wght=350:314 wght=450:403 wght=625:315) (wght=350:556 wght=450:567 wght=625:644)> mark @MC_top;
+             <anchor (wght=350:314 wght=625:315) (wght=350:556 wght=625:644)> mark @MC_top;
      } mark2base;

  } mark;

@anthrotype anthrotype merged commit a7c93d6 into main May 21, 2024
9 checks passed
@khaledhosny khaledhosny deleted the anchors-source-layer branch May 21, 2024 15:15
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

Successfully merging this pull request may close these issues.

2 participants