| Summary: | Broken glyph rendering for both TTF_RenderUNICODE/UTF8 variants. | ||
|---|---|---|---|
| Product: | SDL_ttf | Reporter: | robinds |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.11 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | Big image on top is the output. Small image beneath is an example of correct rendering. | ||
|
Description
robinds
2014-01-25 02:42:48 UTC
Using FreeType version 16.2.10 I checked the kerning, and delta.x and delta.y are both 0 for all characters in the string. The advance is 0 for the characters that stack upon one another, which is what I would expect. Notice though that the glyph shape actually changes when they are composed in this way. I think the font system that KDE is using may actually be substituting glyphs for character sequences. ICU provides advanced functionality to do this sort of thing, but it's not included with SDL. I could be totally wrong though. Can you confirm? Doing more research, it looks like what you need is an OpenType shaping engine. Searching around I found some examples of harfbuzz and SDL, which might be closer to what you need: https://github.com/wutipong/drawtext-sdl2-freetype2-harfbuzz https://github.com/wutipong/drawtext-sdl2-freetype2-harfbuzz/blob/master/sdl-ft-harfbuzz/main.cpp |