Skip to content

Apply user-enabled features globally, like HarfBuzz - #294

Open
lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/handle-frac-substitutions-globally
Open

lehni wants to merge 1 commit into
foliojs:masterfrom
lineto:fix/handle-frac-substitutions-globally

Conversation

@lehni

@lehni lehni commented Sep 14, 2022 •

Copy link
Copy Markdown
Contributor
  • A feature requested by the user was ignored if the shaper had already planned it locally, e.g. frac, which is only applied around U+2044 by default, so substitution-based fractions (common in monospaced fonts) never worked with features: ['frac']
  • Such features now apply to the whole run while keeping their stage, matching HarfBuzz's feature merging (+frac is global there, default frac/numr/dnom stay local)
  • Replaces the previous approach of always applying frac globally, which turned all digits into numerators
  • Add a test for user-enabled frac, matching hb-shape --features=frac output

- A feature requested by the user was ignored if the shaper had already planned it locally, e.g. frac, which is only applied around U+2044 by default
- Such features now apply to the whole run while keeping their stage, matching HarfBuzz's feature merging
- Replaces the previous approach of always applying frac globally, which turned all digits into numerators
- Add a test for user-enabled frac, matching HarfBuzz output
@lehni
lehni force-pushed the fix/handle-frac-substitutions-globally branch from 35e3be5 to c5fc8de Compare October 18, 2026 16:29
@lehni lehni changed the title Handle 'frac' substitutions globally Apply user-enabled features globally, like HarfBuzz Oct 18, 2026
@lehni

lehni commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

@blikblum I've updated this one to be identical with the behavior in HarfBuzz

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.

1 participant