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

samsa-core need to set substituteGlyphId when there is glyph change along the axis #12

Open
Typogram opened this issue Sep 19, 2023 · 4 comments

Comments

@Typogram
Copy link

Samsa-core requires substitute glyph to be set manually when there is a glyph changes along the axis:

if (font.featureVariations) {
  let substituteGlyphId = glyph.featureVariationsGlyphId(
    preset.tuple
  );
  if (substituteGlyphId !== undefined) {
    tempGlyph = font.glyphs[substituteGlyphId];
  }
}
let pathData = tempGlyph.decompose(preset.tuple).svgPath();

Gif: fontkit and harfbuzz have the correct rendering
samsa-switch-glyph

@Lorp
Copy link
Owner

Lorp commented Sep 19, 2023

That’s a good point. Feature variations are not yet implemented in Samsa Core 2, although they do work in Samsa GUI tool. I’ll get to it. It’s curious that this glyph does not work at all in the system rendering. Do you know why that might be?

@Typogram
Copy link
Author

Typogram commented Sep 20, 2023

Wow, cool! you are working on Samsa Core 2, what is it? Is it the Typescript port of the original Samsa-core? Will it have new functionalities and api?

I don't know why it doesn't work on system, maybe there is some kind of name conflict or font face issue? I assume it is not a font issue because it renders on https://wakamaifondue.com/

@Lorp
Copy link
Owner

Lorp commented Sep 20, 2023

RenderStack already uses Samsa Core 2. It’s not complete yet, as you’ve demostrated, but it’s pretty much a rewrite from scratch of the Samsa Core over on the Samsa GUI repo. The decision to switch to Typescript is basically taken, but that won’t be ready for some time.

If you can send me the font, I may be able to check it out when I have some time.

@Typogram
Copy link
Author

I am not too worried about the system not working. So no need to check it! Thanks for offering!

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

2 participants