From 980deb4c9eaf0702e97be1309d9cd10aaf8467af Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 26 Dec 2021 19:51:10 +0100 Subject: [PATCH] Add missing include guard to avoid declaring ImFontAtlasGetBuilderForStbTruetype() function. https://github.com/cimgui/cimgui/issues/193 https://github.com/imgui-rs/imgui-rs/pull/582 --- imgui.h | 2 +- imgui_internal.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/imgui.h b/imgui.h index e986e6c0..f254f681 100644 --- a/imgui.h +++ b/imgui.h @@ -64,7 +64,7 @@ Index of this file: // Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) #define IMGUI_VERSION "1.86" -#define IMGUI_VERSION_NUM 18600 +#define IMGUI_VERSION_NUM 18601 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) #define IMGUI_HAS_TABLE diff --git a/imgui_internal.h b/imgui_internal.h index 73d58f6b..9444472b 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -2815,7 +2815,9 @@ struct ImFontBuilderIO }; // Helper for font builder +#ifdef IMGUI_ENABLE_STB_TRUETYPE IMGUI_API const ImFontBuilderIO* ImFontAtlasGetBuilderForStbTruetype(); +#endif IMGUI_API void ImFontAtlasBuildInit(ImFontAtlas* atlas); IMGUI_API void ImFontAtlasBuildSetupFont(ImFontAtlas* atlas, ImFont* font, ImFontConfig* font_config, float ascent, float descent); IMGUI_API void ImFontAtlasBuildPackCustomRects(ImFontAtlas* atlas, void* stbrp_context_opaque);