Skip to content

Allow access to font atlases #18851

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Apr 15, 2025

Objective

It's not possible atm for third-party crates to create their own text systems that use the existing cosmic-text FontSystem and font atlases.

Solution

Make FontFaceInfo, TextPipeline::map_handle_to_font_id, and load_font_fontdb public so third-party crates can access and update the existing font atlases

… systems that use the existing cosmic-text `FontSystem` and font atlases.

Make  `FontFaceInfo`, `TextPipeline::map_handle_to_font_id`,
and `load_font_fontdb` public to allow the use of the exisiting font atlases so third-party text widgets like a text input don't have to create duplicate font atlases for already loaded fonts.
@ickshonpe ickshonpe changed the title Open text p Allow access to font atlases Apr 15, 2025
@ickshonpe ickshonpe added A-Text Rendering and layout for characters D-Straightforward Simple bug fixes and API improvements, docs, test and examples C-Performance A change motivated by improving speed, memory usage or compile times C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Apr 15, 2025
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-Performance A change motivated by improving speed, memory usage or compile times C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants