Skip to content

font: Properly handle when shaping produces no glyphs#60200

Open
servo-wpt-sync wants to merge 1 commit into
web-platform-tests:masterfrom
servo:servo_export_45176
Open

font: Properly handle when shaping produces no glyphs#60200
servo-wpt-sync wants to merge 1 commit into
web-platform-tests:masterfrom
servo:servo_export_45176

Conversation

@servo-wpt-sync
Copy link
Copy Markdown
Collaborator

When shaping produces no glyphs, which can happen when a zero-width
space is shaped for a font that has no space or zero-width space glyph,
just return an empty ShapedText instead of trying to process any
glyphs. This prevents logic issues due to the rest of the code assuming
there are glyphs.

Testing: This change adds a new WPT crash test.
Fixes: #45174.

Reviewed in servo/servo#45176

When shaping produces no glyphs, which can happen when a zero-width
space is shaped for a font that has no space or zero-width space glyph,
just return an empty `ShapedText` instead of trying to process any
glyphs. This prevents logic issues due to the rest of the code assuming
there are glyphs.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Copy link
Copy Markdown
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Servo project.

@servo-wpt-sync servo-wpt-sync added stale-servo-export PRs that were supposed to merge but were not able to do so. and removed do not merge yet labels May 27, 2026
@servo-wpt-sync
Copy link
Copy Markdown
Collaborator Author

⛔ The downstream PR has merged (servo/servo#45176), but these changes could not be merged properly. Please address any CI issues and try to merge manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css-text servo-export stale-servo-export PRs that were supposed to merge but were not able to do so. wg-css

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants