Closed BanTheRewind closed 2 days ago
I figured it out. I changed this: https://github.com/IDI-Systems/UnrealImGui/blob/master/Source/ImGui/Private/ImGuiContextManager.cpp#L282
FontAtlas.AddFont(CustomFontConfig.Get());
To this:
ImFont* font { FontAtlas.AddFont( CustomFontConfig.Get() ) };
font->ContainerAtlas = &FontAtlas;
You need to tell the font which container atlas it is using if you aren't managing fonts through IO.
Oh sorry, I remember reading this and then totally forgot about it!
Would you consider opening a pull request with that change?
I'll try. Against a deadline atm. The issue there is that I did a lot of other project-specific customization to this plug-in that you wouldn't want in a PR.
This is now available in 834d545.
Following the README, I have created binary headers for two fonts (Helvetica and Helvetica Bold). I have added the fonts successfully, but I don't see how to access the
ImFont*
for use withImGui::PushFont()
. Outside of Unreal, I use theIO->Fonts
directly and get anImFont*
to reference when I add a font. Inside this plug-in, it looks like nothing captures/references theImFont*
when it is added (ImGuiContextManager.cpp:282). Help?