harfbuzz/boring-expansion-spec

[glyf1 var composites] RESET_UNSPECIFIED_AXES semantics

behdad opened this issue · 2 comments

@justvanrossum suggests that when the flag is present, lock the component axes to what is specified; currently, they overlay the font's current location setting. He proposes to not do that. I see the benefit of that. Then we would have two modes:

  • Flag clear: component inherits current location setting of parent and tailors it;
  • Flag set: component is locked to specified location;

I do find this more clear than the current behavior.

For posterity, this is how the flag currently works:

The component glyphs to be loaded use the coordinate values specified (with any variations applied if present). For any unspecified axis, the value used depends on flag bit 14. If the flag is set, then the currently set axis value from the font is used. If the flag is clear the axis value from current glyph being processed (which itself might recursively come from the font or its own parent glyphs) are used. For example, if the font variations have wght=.25 (normalized), and current glyph being processed is using wght=.5 because it was referenced from another VarComposite glyph itself, when referring to a component that does not specify the wght axis, if flag bit 14 is set, then the value of wght=.25 (from the font) will be used. If flag bit 14 is clear, wght=.5 (from current glyph) will be used.

Going forward with this.