Today I learned about "characters" which are made from more than one code point in UTF8. I always believed that one code point in UTF8 maps to a specific character, but it seems like I was wrong. For example, the following single glyph "é" consists of 3 bytes making up 2 code points.
I am having trouble to render this symbol correctly using SDL_ttf. It seems to use the FT_Get_Char_Index function from the freetype library to find the glyph. It does so by passing the code point, and the library treats it as if it was more than one glyph. How would I use the freetype library to render this glyph correctly?
TTF_Font *ttf = TTF_OpenFont("C:\\UbuntuMono-Regular.ttf", 24);
SDL_Color color = {0, 255, 255, 255};
SDL_Surface *surface = TTF_RenderUTF8_Blended(ttf, "é", color); // u8"é" doesn't work neither