-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Update to cosmic-text 0.15 #21699
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
Merged
Merged
Update to cosmic-text 0.15 #21699
+13
−8
Conversation
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
rossleonardy
approved these changes
Nov 3, 2025
3 tasks
nicoburns
approved these changes
Nov 6, 2025
Contributor
nicoburns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given how small the diff is here, this seems worth doing even if we decide to switch to Parley soon. Will give fairer performance comparisons too.
viridia
approved these changes
Nov 6, 2025
viridia
approved these changes
Nov 9, 2025
cart
approved these changes
Nov 13, 2025
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Nov 15, 2025
# Objective Update `bevy_text`'s cosmic-text dependency to 0.15 Fixes bevyengine#21766 ## Solution Very minimal changes here, nothing user facing except an error return type. * Cosmic-text no longer uses `ttf_parser`, so, to validate fonts during asset loading, a `skrifa::FontRef` is constructed instead. If the font is invalid, the font asset loader now returns a `skrifa::ReadError`, not a `ttf_parser::FaceParsingError`. * To get a font from the global `CosmicFontSystem` instance, the `get_font` function requires a weight now. The weight is looked up from the `CosmicFontSystems` font database, immediately before the `get_font` call. The changes here are a little hackish, but that's a symptom of our lack of support for font collections. Co-authored-by: François Mockers <[email protected]>
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Nov 16, 2025
# Objective Update `bevy_text`'s cosmic-text dependency to 0.15 Fixes bevyengine#21766 ## Solution Very minimal changes here, nothing user facing except an error return type. * Cosmic-text no longer uses `ttf_parser`, so, to validate fonts during asset loading, a `skrifa::FontRef` is constructed instead. If the font is invalid, the font asset loader now returns a `skrifa::ReadError`, not a `ttf_parser::FaceParsingError`. * To get a font from the global `CosmicFontSystem` instance, the `get_font` function requires a weight now. The weight is looked up from the `CosmicFontSystems` font database, immediately before the `get_font` call. The changes here are a little hackish, but that's a symptom of our lack of support for font collections. Co-authored-by: François Mockers <[email protected]>
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Nov 16, 2025
# Objective Update `bevy_text`'s cosmic-text dependency to 0.15 Fixes bevyengine#21766 ## Solution Very minimal changes here, nothing user facing except an error return type. * Cosmic-text no longer uses `ttf_parser`, so, to validate fonts during asset loading, a `skrifa::FontRef` is constructed instead. If the font is invalid, the font asset loader now returns a `skrifa::ReadError`, not a `ttf_parser::FaceParsingError`. * To get a font from the global `CosmicFontSystem` instance, the `get_font` function requires a weight now. The weight is looked up from the `CosmicFontSystems` font database, immediately before the `get_font` call. The changes here are a little hackish, but that's a symptom of our lack of support for font collections. Co-authored-by: François Mockers <[email protected]>
ItsDoot
pushed a commit
to ItsDoot/bevy
that referenced
this pull request
Nov 18, 2025
# Objective Update `bevy_text`'s cosmic-text dependency to 0.15 Fixes bevyengine#21766 ## Solution Very minimal changes here, nothing user facing except an error return type. * Cosmic-text no longer uses `ttf_parser`, so, to validate fonts during asset loading, a `skrifa::FontRef` is constructed instead. If the font is invalid, the font asset loader now returns a `skrifa::ReadError`, not a `ttf_parser::FaceParsingError`. * To get a font from the global `CosmicFontSystem` instance, the `get_font` function requires a weight now. The weight is looked up from the `CosmicFontSystems` font database, immediately before the `get_font` call. The changes here are a little hackish, but that's a symptom of our lack of support for font collections. Co-authored-by: François Mockers <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Text
Rendering and layout for characters
C-Dependencies
A change to the crates that Bevy depends on
D-Modest
A "normal" level of difficulty; suitable for simple features or challenging fixes
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
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.
Objective
Update
bevy_text's cosmic-text dependency to 0.15Fixes #21766
Solution
Very minimal changes here, nothing user facing except an error return type.
ttf_parser, so, to validate fonts during asset loading, askrifa::FontRefis constructed instead. If the font is invalid, the font asset loader now returns askrifa::ReadError, not attf_parser::FaceParsingError.CosmicFontSysteminstance, theget_fontfunction requires a weight now. The weight is looked up from theCosmicFontSystemsfont database, immediately before theget_fontcall.The changes here are a little hackish, but that's a symptom of our lack of support for font collections.