SDL_ttf icon indicating copy to clipboard operation
SDL_ttf copied to clipboard

Improved word wrapping support using ICU

Open slouken opened this issue 9 months ago • 0 comments

Sunforest — 1/24/25, 6:27 PM Looking at my notes the other blocker I appeared to have was that there doesn't appear to be a robust line breaking algorithm inside SDL_ttf. Is word wrapping within scope of the library or is are users supposed to do their own word wrapping somehow with the existing API? E.g. Japanese requires a dictionary-based wrapping algorithm and the dictionaries are unfortunately quite massive in size. Currently I rely on ICU to provide word wrapping functionality.

Search for instances of "ubrk" in https://github.com/godotengine/godot/blob/master/modules/text_server_adv/text_server_adv.cpp . The ICU "support data" is also important here which is loaded in that file but generated elsewhere. I never figured out how to generate it myself.

slouken avatar Jan 27 '25 05:01 slouken