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

SDL: text renderer fixes, and CI #17844

Merged
merged 2 commits into from
Aug 3, 2023
Merged

SDL: text renderer fixes, and CI #17844

merged 2 commits into from
Aug 3, 2023

Conversation

hch12907
Copy link
Contributor

@hch12907 hch12907 commented Aug 3, 2023

  1. Since ALIGN_LEFT == 0, the if (align & ALIGN_LEFT) case is never hit. This leads to unintended text alignment sometimes... (See the homebrew description in screenshot)

  2. SDL_ttf pads the rendered text to the right a lot, which is the reason why in some buttons, you can see their labels getting pushed to the left. Fortunately though, the text->w field stores the exact width of the text we rendered, hence instead using an entire row of pixels, we use only the pixels right up to text->w (rounded up a little).

  3. Added dependencies sdl2_ttf and fontconfig to Linux CI.

Master:
image

PR:
image

@hrydgard hrydgard enabled auto-merge August 3, 2023 13:01
@hrydgard hrydgard merged commit 128acdd into hrydgard:master Aug 3, 2023
@unknownbrackets unknownbrackets added this to the v1.16.0 milestone Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants