You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This removes some unnecessary and distracting placeholder glyphs when rendering Noto Nastaliq Urdu (for example).
Before:
After:
@khaledhosny, I wonder if there could be more cases where we don't want to show the guessed placeholder string in the canvas. At least for Noto Nastaliq Urdu, the rendered advance is a good indicator it seems.
Hm, wait, the problem may be different: these are empty glyphs, but they are also unencoded, so there should be no placeholder string to begin with. I need to look deeper.
Hm, wait, the problem may be different: these are empty glyphs, but they are also unencoded, so there should be no placeholder string to begin with. I need to look deeper.
Yes, that was the better analysis. I've adjusted the change accordingly.
justvanrossum
changed the title
Don't draw the guessed placeholder string if the rendered glyph has zero width
Don't draw guessed placeholder strings for unencoded glyphs
Mar 10, 2026
justvanrossum
changed the title
Don't draw guessed placeholder strings for unencoded glyphs
Don't draw incorrect placeholder strings for unencoded glyphs
Mar 10, 2026
justvanrossum
changed the title
Don't draw incorrect placeholder strings for unencoded glyphs
Don't draw incorrect placeholder strings for empty unencoded glyphs
Mar 10, 2026
but a glyph returned from the shaper must exist in the font, no?
The placeholder glyph is also drawn for existing glyphs that are empty. The previous code accidentally assigned a placeholder string to unencoded glyphs based on the input string, which was nonsensical.
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
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.
This removes some unnecessary and distracting placeholder glyphs when rendering Noto Nastaliq Urdu (for example).
Before:
After:
@khaledhosny, I wonder if there could be more cases where we don't want to show the guessed placeholder string in the canvas. At least for Noto Nastaliq Urdu, the rendered advance is a good indicator it seems.