diff --git a/clib.json b/clib.json index 3fe7d63..6ae79d6 100644 --- a/clib.json +++ b/clib.json @@ -1,6 +1,6 @@ { "name": "nuklear", - "version": "4.10.1", + "version": "4.10.5", "repo": "Immediate-Mode-UI/Nuklear", "description": "A small ANSI C gui toolkit", "keywords": ["gl", "ui", "toolkit"], diff --git a/nuklear.h b/nuklear.h index d115913..febee39 100644 --- a/nuklear.h +++ b/nuklear.h @@ -16619,7 +16619,7 @@ nk_font_bake_pack(struct nk_font_baker *baker, struct stbtt_fontinfo *font_info = &baker->build[i++].info; font_info->userdata = alloc; - if (!stbtt_InitFont(font_info, (const unsigned char*)it->ttf_blob, 0)) + if (!stbtt_InitFont(font_info, (const unsigned char*)it->ttf_blob, stbtt_GetFontOffsetForIndex((const unsigned char*)it->ttf_blob, 0))) return nk_false; } while ((it = it->n) != config_iter); } @@ -29654,6 +29654,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args) /// - [y]: Minor version with non-breaking API and library changes /// - [z]: Patch version with no direct changes to the API /// +/// - 2022/12/17 (4.10.5) - Fix nk_font_bake_pack() using TTC font offset incorrectly /// - 2022/10/24 (4.10.4) - Fix nk_str_{append,insert}_str_utf8 always returning 0 /// - 2022/09/03 (4.10.3) - Renamed the `null` texture variable to `tex_null` /// - 2022/08/01 (4.10.2) - Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE diff --git a/src/CHANGELOG b/src/CHANGELOG index 62db3f1..be54e55 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -7,6 +7,7 @@ /// - [y]: Minor version with non-breaking API and library changes /// - [z]: Patch version with no direct changes to the API /// +/// - 2022/12/17 (4.10.5) - Fix nk_font_bake_pack() using TTC font offset incorrectly /// - 2022/10/24 (4.10.4) - Fix nk_str_{append,insert}_str_utf8 always returning 0 /// - 2022/09/03 (4.10.3) - Renamed the `null` texture variable to `tex_null` /// - 2022/08/01 (4.10.2) - Fix Apple Silicon with incorrect NK_SITE_TYPE and NK_POINTER_TYPE diff --git a/src/nuklear_font.c b/src/nuklear_font.c index 49df38e..431ed80 100644 --- a/src/nuklear_font.c +++ b/src/nuklear_font.c @@ -194,7 +194,7 @@ nk_font_bake_pack(struct nk_font_baker *baker, struct stbtt_fontinfo *font_info = &baker->build[i++].info; font_info->userdata = alloc; - if (!stbtt_InitFont(font_info, (const unsigned char*)it->ttf_blob, 0)) + if (!stbtt_InitFont(font_info, (const unsigned char*)it->ttf_blob, stbtt_GetFontOffsetForIndex((const unsigned char*)it->ttf_blob, 0))) return nk_false; } while ((it = it->n) != config_iter); }