ImStrv: fix in ShowIDStackToolWindow(), Font section. Font loading.

This commit is contained in:
ocornut
2025-03-06 19:25:57 +01:00
parent cc3e0a781b
commit c0d18bddb0
2 changed files with 3 additions and 3 deletions

View File

@@ -16142,7 +16142,7 @@ void ImGui::ShowFontAtlas(ImFontAtlas* atlas)
ImFontAtlasRect r = {};
atlas->GetCustomRect(id, &r);
ImStrv buf;
ImFormatStringToTempBuffer(&buf, NULL, "ID:%08X, used:%d, { w:%3d, h:%3d } { x:%4d, y:%4d }", id, entry.IsUsed, r.w, r.h, r.x, r.y);
ImFormatStringToTempBuffer(&buf, "ID:%08X, used:%d, { w:%3d, h:%3d } { x:%4d, y:%4d }", id, entry.IsUsed, r.w, r.h, r.x, r.y);
TableNextColumn();
Selectable(buf.Begin);
if (IsItemHovered())
@@ -17827,7 +17827,7 @@ void ImGui::ShowIDStackToolWindow(bool* p_open)
if (c == '/')
tool->ResultTempBuf.append("\\");
if (c < 256 || !tool->OptHexEncodeNonAsciiChars)
tool->ResultTempBuf.append(p, p_next);
tool->ResultTempBuf.append(ImStrv(p, p_next));
else for (; p < p_next; p++)
tool->ResultTempBuf.appendf("\\x%02x", (unsigned char)*p);
p = p_next;

View File

@@ -3135,7 +3135,7 @@ ImFont* ImFontAtlas::AddFontFromFileTTF(ImStrv filename, float size_pixels, cons
{
if (font_cfg_template == NULL || (font_cfg_template->Flags & ImFontFlags_NoLoadError) == 0)
{
IMGUI_DEBUG_LOG("While loading '%s'\n", filename);
IMGUI_DEBUG_LOG("While loading '%.*s'\n", filename.length(), filename.Begin);
IM_ASSERT_USER_ERROR(0, "Could not load font file!");
}
return NULL;