Consistently pass through the root style for empty text - #721
Merged
Conversation
tomcur
force-pushed
the
push-vvpozqksmsok
branch
from
July 30, 2026 18:14
80680bd to
d2a5413
Compare
nicoburns
approved these changes
Jul 31, 2026
nicoburns
left a comment
Collaborator
There was a problem hiding this comment.
Feels like we ought to do something more principled here, but happy to go with this for now.
Empty text still needs to be able to size cursors, I hit this when making font selection infallible, which tripped up `builders_empty`. (This might also be useful for sizing "struts".)
tomcur
force-pushed
the
push-vvpozqksmsok
branch
from
July 31, 2026 08:35
d2a5413 to
0dab6da
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.
On top of #720, as otherwise that code hits an underflow.
Empty text still needs a style, e.g., to be able to size cursors. This PR plumbs the root style through. I hit this when making font selection infallible, which tripped up the
builders_emptytest.(This might also be useful for sizing "struts".)
Because with this change these empty layouts now actually have a style, that means font selection now succeeds in the
builders_emptytest, where it previously failed. Not having a font was the only reason there weren't any runs in the changed test, because, for empty text,parleyactually shapes a space character, which should lead to a run.I've chosen to remove checking that runs are empty from the test, as I think it's mostly checking the wrong thing at the moment. If we ever stop synthesizing a space character for empty text, we should revisit this.