-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add support for 'Virtual Master' custom parameters #955
Merged
Conversation
This file contains 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
…axis min/max but only for axes that are un-mapped, since virtual master coordinates have no means of mapping {user:design} so are assumed un-mapped (whereas axis min/def/max must be in user-space).
with default glyphs_multivalued=False, we end up only storing one 'Virtual Master' param; also we want to read/write these only when dealing with GSFont, not also GSFontMaster
…params The test font 'IntermediateLayer.glyphs' has a couple of glyphs that use virtual masters to control the cap height via a 'CPHT' axis. It contains no Axis Mappings nor Axis Location parameters, the axis coordinates are intented to be un-mapped (user==design). The virtual master custom parameters are expected to be taken into account when computing the CPHT min and max values.
somehow it fails while installing skia-pathops, trying to build from source. Probably we only need to bump requirements-dev.txt but I want to do that separately
anthrotype
force-pushed
the
virtual-masters
branch
from
November 8, 2023 18:54
8ccbde7
to
8082f99
Compare
/cc @RosaWagner |
in absence of explicit Axis Mappings or Axis Location, we infer wght/wdth user-spacelocations from the instances; however if the axis is un-mapped or resolves in an identity (no-op) mapping, there's no reason to prefer the instance-based mapping over the similarly identity/no-op mapping associated with the masters; actually it's possible that instances do not cover all the masters and thus by preferring the instances' mapping over the masters' we might produce incorrect axis min/max. So, only use the inferred instance-based mapping when it does something interesting, otherwise keep using the master (identity) mapping.
anthrotype
force-pushed
the
virtual-masters
branch
from
November 13, 2023 16:58
d2df33e
to
b54d99d
Compare
I couldn't find real world font projects using virtual master custom parameters, but @MariannaPaszkowska shared with me a couple of test fonts of her and they seem to work with the current PR, so I think this this is good to go. |
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.
Fixes #859