We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4247

Summary: Proper UTF-16 and characters outside the BMP support
Product: SDL_ttf Reporter: pjz <acme_pjz>
Component: miscAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Windows 10   

Description pjz 2018-09-03 07:21:42 UTC
I propose a patch with added proper UTF-16 and characters outside the BMP support, which extends the fix to the bug #3762. The code can be found at <https://github.com/acmepjz/SDL_ttf/tree/utf16-fix>.

* Change the UCS-2 code to UTF-16 code, which allows characters outside the BMP range

* Change various public functions (TTF_GlyphIsProvided, TTF_GlyphMetrics, TTF_RenderGlyph_***, etc.) to accept Uint32 for character instead of Uint16

* Also added a UTF-32 to UTF-8 conversion routine (which is only used in TTF_RenderGlyph_***)