From 01460cafa2cf86c2b007d76d8d7ba49c740292da Mon Sep 17 00:00:00 2001 From: Tom Gaudasinski Date: Sun, 8 Sep 2019 13:41:58 +1000 Subject: [PATCH] Issue #896: If we're not merging, then it's possible we're re-baking. Clear the glyph counter so that we start from zero again. --- nuklear.h | 1 + src/nuklear_font.c | 1 + 2 files changed, 2 insertions(+) diff --git a/nuklear.h b/nuklear.h index ecc43184..c0169269 100644 --- a/nuklear.h +++ b/nuklear.h @@ -12895,6 +12895,7 @@ nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int hei dst_font->ascent = ((float)unscaled_ascent * font_scale); dst_font->descent = ((float)unscaled_descent * font_scale); dst_font->glyph_offset = glyph_n; + dst_font->glyph_count = 0; } /* fill own baked font glyph array */ diff --git a/src/nuklear_font.c b/src/nuklear_font.c index 1a185585..94410695 100644 --- a/src/nuklear_font.c +++ b/src/nuklear_font.c @@ -2347,6 +2347,7 @@ nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int hei dst_font->ascent = ((float)unscaled_ascent * font_scale); dst_font->descent = ((float)unscaled_descent * font_scale); dst_font->glyph_offset = glyph_n; + dst_font->glyph_count = 0; } /* fill own baked font glyph array */