|
|
@ -1475,8 +1475,11 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas) |
|
|
|
const int font_offset = stbtt_GetFontOffsetForIndex((unsigned char*)cfg.FontData, cfg.FontNo); |
|
|
|
const int font_offset = stbtt_GetFontOffsetForIndex((unsigned char*)cfg.FontData, cfg.FontNo); |
|
|
|
IM_ASSERT(font_offset >= 0); |
|
|
|
IM_ASSERT(font_offset >= 0); |
|
|
|
if (!stbtt_InitFont(&tmp.FontInfo, (unsigned char*)cfg.FontData, font_offset)) |
|
|
|
if (!stbtt_InitFont(&tmp.FontInfo, (unsigned char*)cfg.FontData, font_offset)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ImGui::MemFree(tmp_array); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Allocate packing character data and flag packed characters buffer as non-packed (x0=y0=x1=y1=0)
|
|
|
|
// Allocate packing character data and flag packed characters buffer as non-packed (x0=y0=x1=y1=0)
|
|
|
|
int buf_packedchars_n = 0, buf_rects_n = 0, buf_ranges_n = 0; |
|
|
|
int buf_packedchars_n = 0, buf_rects_n = 0, buf_ranges_n = 0; |
|
|
|