Skip to content

Commit 017f27b

Browse files
authored
Merge pull request #531 from dulingzhi/fix/incorrect-font-bake
Fix incorrect glyph index in nk_font_bake
2 parents b4b94b0 + 23cb43f commit 017f27b

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

clib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuklear",
3-
"version": "4.10.5",
3+
"version": "4.10.6",
44
"repo": "Immediate-Mode-UI/Nuklear",
55
"description": "A small ANSI C gui toolkit",
66
"keywords": ["gl", "ui", "toolkit"],

nuklear.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16794,7 +16794,6 @@ nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int hei
1679416794

1679516795
/* query glyph bounds from stb_truetype */
1679616796
const stbtt_packedchar *pc = &range->chardata_for_range[char_idx];
16797-
if (!pc->x0 && !pc->x1 && !pc->y0 && !pc->y1) continue;
1679816797
codepoint = (nk_rune)(range->first_unicode_codepoint_in_range + char_idx);
1679916798
stbtt_GetPackedQuad(range->chardata_for_range, (int)width,
1680016799
(int)height, char_idx, &dummy_x, &dummy_y, &q, 0);
@@ -29669,6 +29668,7 @@ nk_tooltipfv(struct nk_context *ctx, const char *fmt, va_list args)
2966929668
/// - [y]: Minor version with non-breaking API and library changes
2967029669
/// - [z]: Patch version with no direct changes to the API
2967129670
///
29671+
/// - 2022/12/23 (4.10.6) - Fix incorrect glyph index in nk_font_bake()
2967229672
/// - 2022/12/17 (4.10.5) - Fix nk_font_bake_pack() using TTC font offset incorrectly
2967329673
/// - 2022/10/24 (4.10.4) - Fix nk_str_{append,insert}_str_utf8 always returning 0
2967429674
/// - 2022/09/03 (4.10.3) - Renamed the `null` texture variable to `tex_null`

src/CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/// - [y]: Minor version with non-breaking API and library changes
88
/// - [z]: Patch version with no direct changes to the API
99
///
10+
/// - 2022/12/23 (4.10.6) - Fix incorrect glyph index in nk_font_bake()
1011
/// - 2022/12/17 (4.10.5) - Fix nk_font_bake_pack() using TTC font offset incorrectly
1112
/// - 2022/10/24 (4.10.4) - Fix nk_str_{append,insert}_str_utf8 always returning 0
1213
/// - 2022/09/03 (4.10.3) - Renamed the `null` texture variable to `tex_null`

src/nuklear_font.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ nk_font_bake(struct nk_font_baker *baker, void *image_memory, int width, int hei
354354

355355
/* query glyph bounds from stb_truetype */
356356
const stbtt_packedchar *pc = &range->chardata_for_range[char_idx];
357-
if (!pc->x0 && !pc->x1 && !pc->y0 && !pc->y1) continue;
358357
codepoint = (nk_rune)(range->first_unicode_codepoint_in_range + char_idx);
359358
stbtt_GetPackedQuad(range->chardata_for_range, (int)width,
360359
(int)height, char_idx, &dummy_x, &dummy_y, &q, 0);

0 commit comments

Comments
 (0)