Skip to content

Conversation

@sshane
Copy link
Contributor

@sshane sshane commented Oct 2, 2025

gpt5 thinks qt is considering the text top/ascent and bottom/descent and raylib is not: https://stackoverflow.com/questions/27631736/meaning-of-top-ascent-baseline-descent-bottom-and-leading-in-androids-font

you can see qt's text height is ~1.2x the set text height

image

both cases the red line is set to the font size. in raylib the red line spans the text rect, in qt the text rect expands past. so qt must calculate the text size differently

Image Image

@github-actions github-actions bot added the ui label Oct 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

raylib UI Preview

confirmation_dialog : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
homescreen : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
homescreen_update_available : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
keyboard : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
offroad_alert : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_developer : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_device : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_firehose : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_network : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_software : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
settings_toggles : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
software_release_notes : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
All Screenshots

@sshane sshane marked this pull request as draft October 2, 2025 10:35
@sshane sshane mentioned this pull request Oct 2, 2025
47 tasks
@sshane
Copy link
Contributor Author

sshane commented Oct 4, 2025

just using a const to approximate. real scales:

{3: 1.2658227848101267, 4: 1.2658227848101267, 5: 1.2658227848101267, 6: 1.25, 7: 1.2422360248447204, 8: 1.2345679012345678, 9: 1.2195121951219512, 10: 1.2195121951219512, 11: 1.2121212121212122}

@sshane
Copy link
Contributor Author

sshane commented Oct 4, 2025

fixing long text:

image image

@sshane sshane marked this pull request as ready for review October 4, 2025 07:14
@sshane
Copy link
Contributor Author

sshane commented Oct 4, 2025

a lot of the fonts are just scaled with the origin at the top because the functions that call the text rendered assume the height will be what they pass in. can't easily solve without replacing all text sizes across the UI in the code manually, so will leave for later. you can see the diff above, it doesn't look egregiously off center

@sshane sshane merged commit 7933c10 into master Oct 4, 2025
13 of 14 checks passed
@sshane sshane deleted the debug-rl-small-text branch October 4, 2025 07:32
sshane added a commit that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants