Skip to content

Feedback on page SDL3_ttf/TTF_DrawSurfaceText #776

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

Open
webwraith opened this issue Apr 15, 2025 · 1 comment
Open

Feedback on page SDL3_ttf/TTF_DrawSurfaceText #776

webwraith opened this issue Apr 15, 2025 · 1 comment

Comments

@webwraith
Copy link

webwraith commented Apr 15, 2025

Can we get some more information on how to set up the SDL_Surface for this function? Is it supposed to be already created, and if so, how do we get the correct dimensions and pixel format for it? This feels rather obtuse to someone new to the library (like myself, for example!)

@slouken
Copy link
Contributor

slouken commented Apr 24, 2025

If you just want to create a surface with text, you probably want to use the TTF_RenderText_* functions. TTF_DrawSurfaceText() is useful when you have an existing surface that you're doing other drawing on that you also want to add text to.

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

No branches or pull requests

2 participants