Repository navigation
Conversation
lehni
force-pushed
the
fix/feature-variations-default-location
branch
from
October 18, 2026 16:02
dd73900 to
2fda4e7
Compare
Member
This issue can be replicated with a non synthetic font? |
Contributor
Author
|
Yes, it shows up in one of our not yet released commercial fonts, At the default location HarfBuzz substitutes |
lehni
force-pushed
the
fix/feature-variations-default-location
branch
from
October 18, 2026 16:32
2fda4e7 to
d8a9d9a
Compare
- A TrueType variable font with no explicit variation set skipped FeatureVariations entirely, unlike HarfBuzz, which always evaluates them at the current location - Evaluate them at the default location for such fonts, so default-location substitutions (e.g. bracket-layer alternates) apply - Add a test with a subset of Archivo (OFL), whose rvrn alternates for $ and ¢ cover the default weight
lehni
force-pushed
the
fix/feature-variations-default-location
branch
from
October 21, 2026 22:10
d8a9d9a to
5236ef0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A variable font with no explicit variation set builds no
_variationProcessor(the non-CFF2 path returnsnullwhen no coords are applied), soOTProcessorskips FeatureVariations entirely — unlike HarfBuzz, which always evaluates them at the current location. As a result, default-location substitutions (e.g. bracket-layer /rvrnalternates whose condition set covers the default) never apply unless you explicitly instance the font.Fix
Evaluate FeatureVariations at the normalized origin (all-zero coords) for a variable font that has no
_variationProcessor, so default-location substitutions apply — matching HarfBuzz.Tests
Adds a small subset of Archivo (OFL) as a fixture: its
rvrnswaps$/¢for bracket-layer alternates from wght 500 up, which covers the default (600). Without the fix the test yieldsdollar/cent; with it,dollar.BRACKET.110/cent.BRACKET.110, matching HarfBuzz.