diff --git a/docs/book/_sources/doc_api.md b/docs/book/_sources/doc_api.md index 7903d2a9..3682b22e 100644 --- a/docs/book/_sources/doc_api.md +++ b/docs/book/_sources/doc_api.md @@ -96,6 +96,7 @@ See [hello_imgui_font.h](https://github.com/pthom/hello_imgui/blob/master/src/he // if true, the font will be loaded and then FontAwesome icons will be merged to it // (deprecated, use mergeToLastFont instead, and load in two steps) + // This will use an old version of FontAwesome (FontAwesome 4) bool mergeFontAwesome = false; ImFontConfig fontConfigFontAwesome = ImFontConfig(); }; @@ -110,6 +111,36 @@ See [hello_imgui_font.h](https://github.com/pthom/hello_imgui/blob/master/src/he const FontLoadingParams & params = {}); + // Note: if you want to use a more recent version of Font Awesome, + // =============================================================== + // see example at src/hello_imgui_demos/hello_imgui_demo_fontawesome6 + // + // The principle is summarized below: + // - Download Font_Awesome_6_Free-Solid-900.otf from https://fontawesome.com/download + // - Download IconsFontAwesome6.h from https://raw.githubusercontent.com/juliettef/IconFontCppHeaders/main/IconsFontAwesome6.h + // + // Code: + // + // // Prevent HelloImGui from loading Font Awesome 4 definitions, since we will load FontAwesome 6 + // #define HELLOIMGUI_NO_FONT_AWESOME4 + // #include "hello_imgui/hello_imgui.h" + // #include "IconsFontAwesome6.h" + // + // ... + // + // // Load the default font + merge it with Font Awesome 6 + // HelloImGui::RunnerParams runnerParams; + // runnerParams.callbacks.LoadAdditionalFonts = [] + // { + // // Load the default font + // HelloImGui::LoadFont("fonts/DroidSans.ttf", 15.0f); + // + // // Merge FontAwesome6 with the default font + // HelloImGui::FontLoadingParams fontParams; + // fontParams.mergeToLastFont = true; + // fontParams.useFullGlyphRange = true; + // HelloImGui::LoadFont("fonts/Font_Awesome_6_Free-Solid-900.otf", 15.0f, fontParams); + // }; ``` ---- diff --git a/docs/book/_sources/doc_params.md b/docs/book/_sources/doc_params.md index b5ce07c2..a6169294 100644 --- a/docs/book/_sources/doc_params.md +++ b/docs/book/_sources/doc_params.md @@ -310,19 +310,16 @@ struct RunnerCallbacks // but you can copy and customize it. // (LoadDefaultFont_WithFontAwesome will load fonts from assets/fonts/ // but reverts to the ImGui embedded font if not found) - VoidFunction LoadAdditionalFonts = - (VoidFunction)(ImGuiDefaultSettings::LoadDefaultFont_WithFontAwesomeIcons); + VoidFunction LoadAdditionalFonts = (VoidFunction)ImGuiDefaultSettings::LoadDefaultFont_WithFontAwesomeIcons; // `SetupImGuiConfig`: default=_ImGuiDefaultSettings::SetupDefaultImGuiConfig*. // If needed, change ImGui config via SetupImGuiConfig // (enable docking, gamepad, etc) - VoidFunction SetupImGuiConfig = - (VoidFunction)(ImGuiDefaultSettings::SetupDefaultImGuiConfig); + VoidFunction SetupImGuiConfig = (VoidFunction)ImGuiDefaultSettings::SetupDefaultImGuiConfig; // `SetupImGuiStyle`: default=_ImGuiDefaultSettings::SetupDefaultImGuiConfig*. // If needed, set your own style by providing your own SetupImGuiStyle callback - VoidFunction SetupImGuiStyle = - (VoidFunction)(ImGuiDefaultSettings::SetupDefaultImGuiStyle); + VoidFunction SetupImGuiStyle = (VoidFunction)ImGuiDefaultSettings::SetupDefaultImGuiStyle; // `RegisterTests`: A function that is called once ImGuiTestEngine is ready // to be filled with tests and automations definitions. @@ -748,7 +745,8 @@ struct ImGuiWindowParams ImGuiTheme::ImGuiTweakedTheme tweakedTheme; // backgroundColor: - // This is the "clearColor", visible if defaultImGuiWindowType!=ProvideFullScreenWindow. + // This is the "clearColor", i.e. the app window background color, is visible *only if* + // runnerParams.imGuiWindowParams.defaultImGuiWindowType = NoDefaultWindow // Alternatively, you can set your own RunnerCallbacks.CustomBackground to have full // control over what is drawn behind the Gui. ImVec4 backgroundColor = ImVec4(0.f, 0.f, 0.f, 0.f); diff --git a/docs/book/doc_api.html b/docs/book/doc_api.html index d704b266..11e2aa73 100644 --- a/docs/book/doc_api.html +++ b/docs/book/doc_api.html @@ -514,6 +514,7 @@