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

Document font_size #7273

Closed
rparrett opened this issue Jan 19, 2023 · 0 comments · Fixed by #9320
Closed

Document font_size #7273

rparrett opened this issue Jan 19, 2023 · 0 comments · Fixed by #9320
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@rparrett
Copy link
Contributor

rparrett commented Jan 19, 2023

How can Bevy's documentation be improved?

The font_size field of TextStyle can be confusing.

It corresponds to the vertical height of glyphs in pixels on the font atlas texture when they are rasterized. In other words, it is the text "resolution."

Additionally (I think) it is multiplied by the window scale factor, but not by camera scale.

With default camera/ui scaling, this is 1:1 with screen pixels, so it is often treated as a "text size." But this can be surprising to users with custom scaling, and we should at least mention this in the docs.

With a Text2dBundle and a zoomed-in camera, text will appear large and pixelated. With a zoomed-out camera, text will appear small.

With a TextBundle and a UI camera and higher UI scales, text will be larger (but not pixelated, I think?), etc.

Whoever picks this up should verify these statements.

@rparrett rparrett added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled A-UI Graphical user interfaces, styles, layouts, and widgets D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Triage This issue needs to be labelled labels Jan 19, 2023
github-merge-queue bot pushed a commit that referenced this issue Aug 3, 2023
# Objective

Fixes #7273
Closes #7578

This PR also drive-by fixes a broken doc link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant