veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.17k stars 219 forks source link

ttf: binded TTF_FontFaceStyleName in sdl_ttf.go #553

Closed SimpleClips closed 1 year ago

SimpleClips commented 1 year ago

Binded TTF_FontFaceStyleName to FaceStyleName() on the Font struct. Added a stub for SDL 2.0.0 support (TTF_FontFaceStyleName was not supported until version 2.0.12).

552

SimpleClips commented 1 year ago

Upon further inspection, TTF_FontFaceStyleName appears to have been added in development of version 2.0.4 despite what the wiki says at the time I wrote that commit. In addition, any version older than that seem to be missing SDL_TTF_VERSION_ATLEAST which the stub function's conditional compilation depends on. Not to mention I get other compile errors with any version of SDL_ttf older than 2.0.10.

Should the stub function be removed or improved with a more version compatible conditional compilation?

veeableful commented 1 year ago

Hi @SimpleClips, thanks for the pull request! Perhaps this can be merged first and we can create additional PR if needed for older versions of SDL2_ttf?

SimpleClips commented 1 year ago

Good point. I amended my commit to remove the stub function since it wouldn't have any meaningful benefit in its current state.