Closed cuk0r closed 1 year ago
Have you tried with imgui_freetype?
I added imgui_freetype and builded successfully. I tried to use it with adding this to the load config.
awesome_cfg.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags::ImGuiFreeTypeBuilderFlags_ForceAutoHint;
It didn't change anything.
Actually I got it working, if anyone has this same exact issue, disabling merge mode was the way to go. It now renders sharp and nice icons :)
This seems odd. MergeMode shouldn't affect the rendered glyphs, and it is difficult to use an icon font without merging them. Which font setting did you use for the font you merged on?
Yes I was thinking about why it would cause an issue. Right now I load the font like this.
ImFontConfig awesome_cfg{};
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFont* m_awesome = ImGui::GetIO().Fonts->AddFontFromFileTTF("fonts/fa-solid-900.ttf", 100.f, &awesome_cfg, icon_ranges);
Note our current font system is rather poor and rendering at 100.0f you'll likely want to set OversamplingH to 1 in the ImFontConfig structure to save on memory and rendering time. https://github.com/ocornut/imgui/blob/master/docs/FONTS.md
Version/Branch of Dear ImGui:
Version: 1.89.2 Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp + imgui_impl_win32.cpp Compiler: MSVC Operating System: Windows 10
My Issue/Question:
I try to render Font Awesome 6 Pro icons using a ImDrawList, and its only drawn sharp if I use 13.f font size. Other font sizes are extremely blurry, even with adjusted font sizes.
Screenshots/Video
Standalone, minimal, complete and verifiable example: