mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-02 03:40:06 +00:00
Begin: moved tooltip position code in an else block. Misc comments
This commit is contained in:
parent
52cac135c9
commit
928a4ad315
2 changed files with 6 additions and 7 deletions
|
|
@ -1733,7 +1733,7 @@ bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
|||
IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == atlas));
|
||||
|
||||
const int font_offset = stbtt_GetFontOffsetForIndex((unsigned char*)cfg.FontData, cfg.FontNo);
|
||||
IM_ASSERT(font_offset >= 0);
|
||||
IM_ASSERT(font_offset >= 0 && "FontData is incorrect, or FontNo cannot be found.");
|
||||
if (!stbtt_InitFont(&tmp.FontInfo, (unsigned char*)cfg.FontData, font_offset))
|
||||
{
|
||||
atlas->TexWidth = atlas->TexHeight = 0; // Reset output on failure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue