libosmscout icon indicating copy to clipboard operation
libosmscout copied to clipboard

OpenGL Renderer: Text not correctly rendered on Mac OS X

Open Framstag opened this issue 8 years ago • 0 comments

On Mac OS X is not correctly rendered. Small test shows that UTF8StringToU32String is used. This though uses a UTF-8 to UTF-32 conversion, which does enforce a special byte ordering but uses the default ordering of the OS.

If I use iconv with a UTF-32LE => UTF-8 conversion everxything is OK. Looks like the OpenGL text rendering code expects a certain byte ordering. We can either fix this in the OpenGL code or offer a special conversion method enforcing a special byte ordering. Another option would be to pass the BOM mark back in the result (using a special conversion) to give hint to the current byte ordering. Note in cases where not iconv is used but codecvt, I'm not sure we have such influence. This handling this in the OpenGL part if possible could be helpful for the rest of the code.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Framstag avatar Sep 01 '17 18:09 Framstag