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

ttf does not provide TTF_GlyphIsProvided #615

Open
boredcoder411 opened this issue Dec 13, 2024 · 8 comments
Open

ttf does not provide TTF_GlyphIsProvided #615

boredcoder411 opened this issue Dec 13, 2024 · 8 comments

Comments

@boredcoder411
Copy link

same as title, no TTF_GlyphIsProvided in the sdl2-ttf package

@shellohunter
Copy link

ttf_measure APIs missing too, such as: https://wiki.libsdl.org/SDL2_ttf/TTF_MeasureUTF8
those api are quite helpful when dealing with line wrapping.

is there any reason for dropping those APIs, or just because of short of hands?

@veeableful
Copy link
Contributor

Hi, sorry about the missing APIs 💦 I will add them once I'm available to do so.

@veeableful
Copy link
Contributor

Hi @boredcoder411 and @shellohunter, I have added the bindings to the master branch. Would you like to try it out?

@shellohunter
Copy link

measure APIs works as expected. thanks! will them be in next tag?

btw, I noticed that v0.5 is in beta, it would be nice if sdl2 enums have enum-like typedefs in golang, something like this:

type MouseButton uint8
const(
     MouseButtonLeft MouseButton = 0
     MouseButtonRight MouseButton = 1
)

language servers can make use of it, providing better auto-completion.

@veeableful
Copy link
Contributor

@shellohunter Yes! They will be in the next tag.

We have constants ButtonLeft and ButtonRight. Is that what is being referred to?

@shellohunter
Copy link

constants are just integers, what I mean is to add specific types to group constants like this: https://gobyexample.com/enums , then go can make basic type checking to prevent misuse, and it will be more comprehensive to LSP.

@veeableful
Copy link
Contributor

veeableful commented Dec 23, 2024

@shellohunter we do have the Button type. Is there something that you find missing?

If there is, please create another issue!

@shellohunter
Copy link

@veeableful just noticed they are already available in master branch. no issues anymore.

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

3 participants