SDL_ttf icon indicating copy to clipboard operation
SDL_ttf copied to clipboard

Way to list all codepoints available

Open mcendu opened this issue 1 month ago • 3 comments

I am implementing TTF support for a text engine that needs to know which codepoints are available in a font's charmap, but it seems right now there is no function for that in SDL_ttf.

I am thinking of something that maps directly to FT_Get_First_Char and FT_Get_Next_Char, but other forms are also OK.

mcendu avatar Nov 24 '25 10:11 mcendu

As someone involved / interested here, just to explain this use case a bit more because the OP barely does - the reason for wanting this is to be able to support falling back to another font that may have the glyphs required in a given context.

bdach avatar Nov 25 '25 10:11 bdach

Do you actually need to know what codepoints are available, or does the new font fallback functionality solve your problem?

slouken avatar Nov 25 '25 22:11 slouken

That would be TTF_AddFallbackFont and friends, right?

I don't discount that maybe we could use that instead, sure, but I'd have to get stuck in details that I'm currently not well-versed in.

bdach avatar Nov 26 '25 12:11 bdach