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 - Proper UTF-16 and characters outside the BMP support
Summary: Proper UTF-16 and characters outside the BMP support
Status: NEW
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Windows 10
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-03 07:21 UTC by pjz
Modified: 2018-09-03 07:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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_***)