Skip to content

Return the errors from GetWrappedLines in LayoutText instead of ignoring them#560

Open
SimonMaracine wants to merge 1 commit intolibsdl-org:mainfrom
SimonMaracine:fix-layout-text-ignoring-errors
Open

Return the errors from GetWrappedLines in LayoutText instead of ignoring them#560
SimonMaracine wants to merge 1 commit intolibsdl-org:mainfrom
SimonMaracine:fix-layout-text-ignoring-errors

Conversation

@SimonMaracine
Copy link
Copy Markdown

@SimonMaracine SimonMaracine commented Jun 29, 2025

GetWrappedLines can return with a bunch of errors and LayoutText was previously ignoring them by returning true.

I stumbled into this when I made a mistake misusing the API, that caused TrueType to return an error somewhere deep into the call stack of SDL_ttf. Before the patch, that error was not showing up, instead the text was silently not being rendered.

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.

1 participant