Skip to content

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

Description

@Typogram

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions