armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.29k stars 336 forks source link

Support for multibyte utf8 glyphs is broken #1531

Closed MathemanFlo closed 1 year ago

MathemanFlo commented 1 year ago

ArmorPaint version: ArmorPaint.org - v0.9 (2023-03-08) - c0f1b19

OS/device including version: Windows - Direct3D11

Issue description: ArmorPaint does not treat 'äöü€' and similar multibyte glyphs correctly anymore.

Steps to reproduce:

  1. Switch to the German (DE) locale or any other locale that uses non ascii (i.e. non 1 byte characters) like the greek locale where ArmorPaint is completely unusable at the moment
  2. Close ArmorPaint
  3. Open the "Camera" menu

The first entry should be "Zurücksetzen" (reset), but the 'ü' is missing now. grafik I believe the glyphs are not loaded correctly. Because if the user goes to the Script tab and types these glyphs, then the behavior changes: grafik

Second observation: Switching to EN and back to DE (after step 3) fixes the rendering problem. grafik But the carret in the script tab is still at the "number of bytes" position and not the "number of glyphs"/"text font width" position grafik

Example with greek loale grafik

luboslenco commented 1 year ago

Hopefully all good now.

MathemanFlo commented 1 year ago

Yes. The issue is definitely fixed. Thank's a lot.