Skip to content

Commit

Permalink
fix: glyph range size (#196)
Browse files Browse the repository at this point in the history
* [API] Fix glyph array size

* [API] Fix macro multiple lines

* [API] Fix variable to use in ImFontAtlas

* [API] Fix counting of size in ImFontAtlas
  • Loading branch information
kusaanko authored Aug 28, 2023
1 parent 7d545c3 commit 64416f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion imgui-binding/src/main/java/imgui/ImFontAtlas.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,10 @@ private ByteBuffer createRgba32Pixels(final int size) {

/*JNI
#define RETURN_GLYPH_2_SHORT(glyphs) \
int size = sizeof(glyphs); \
const ImWchar* ranges = glyphs; \
int size = 0; \
for (; ranges[0]; ranges += 2) \
size += 2; \
jshortArray jShorts = env->NewShortArray(size); \
env->SetShortArrayRegion(jShorts, 0, size, (jshort*)glyphs); \
return jShorts;
Expand Down

0 comments on commit 64416f1

Please sign in to comment.