fix(#8): support default variable font#60
Merged
Conversation
…nd style for default fonts. keep in mind the current default font only has weight axis available.
When Taffy requests min-content size, we were shaping with wrap_width=0 (one token per line) and reporting both the resulting width and height. This caused Taffy to over-reserve vertical space: it assumed the column needed the artificially tall height, even though the final allocated width (equal to the longest word) allows much more efficient text reflow. Fix: for min-content queries, compute the true min-content width first (wrap_width=0), then re-measure height using that width. This ensures the reported height is consistent with what the node actually needs at the width Taffy will allocate.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Fixed
font_weight()andfont_style()now work correctly when using the default font, which is a variable font. Note that the current built-in default font only exposes the weight axis.Closes #8