SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
547 stars 90 forks source link

Fix glyph range size #196

Closed kusaanko closed 10 months ago

kusaanko commented 10 months ago

Description

ImFontAtlas#getGlyphRanges*** returns invalid length of short array. This causes an problem that by using this method we can't render Japanese, Chinese and so on. This bug comes from the bug of RETURN_GLYPH_2_SHORT. The size comes from sizeof(glyphs), but glyphs is ImWchar*, which is pointer, so it returns the size of pointer not array length.

Fixes #131 Fixes #70

Type of change

SpaiR commented 10 months ago

Thanks for the contribution! I'll make the release with it in the near future.