Skip to content
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

Make CosmicFontSystem and SwashCache pub resources. #15479

Merged
merged 6 commits into from
Sep 28, 2024

Conversation

tychedelia
Copy link
Contributor

Objective

In nannou, we'd like to be able to access the outline commands from swash, while still benefit from Bevy's management of font assets.

Solution

Make CosmicFontSystem and SwashCache pub resources.

Testing

Ran some examples.

@tychedelia tychedelia added C-Feature A new feature, making something new possible A-Text Rendering and layout for characters S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 27, 2024
@alice-i-cecile alice-i-cecile added this to the 0.15 milestone Sep 27, 2024
Copy link
Contributor

@UkoeHB UkoeHB left a comment

Choose a reason for hiding this comment

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

Considering the FontSystem was already exposed with mutable access, this looks fine.

Might be nice to clarify the docs for CosmicFontSystem and SwashCache that they are updated automatically by TextPipeline.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Sep 27, 2024
@alice-i-cecile
Copy link
Member

Let me know when docs are updated and CI is passing :)

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Sep 27, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Sep 28, 2024
Merged via the queue into bevyengine:main with commit df23b93 Sep 28, 2024
27 checks passed
robtfm pushed a commit to robtfm/bevy that referenced this pull request Oct 4, 2024
…5479)

# Objective

In nannou, we'd like to be able to access the [outline
commands](https://docs.rs/cosmic-text/latest/cosmic_text/struct.SwashCache.html#method.get_outline_commands)
from swash, while still benefit from Bevy's management of font assets.

## Solution

Make `CosmicFontSystem` and  `SwashCache` pub resources.

## Testing

Ran some examples.
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-Feature A new feature, making something new possible S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants