Closed Wyverex42 closed 6 months ago
ImGuiContext.cpp references the TTF file directly like this:
ImGuiContext.cpp
const FString FontPath = FPaths::EngineContentDir() / TEXT("Slate/Fonts/Roboto-Regular.ttf");
This works fine in editor and non-staged builds, however as soon as you stage and/or package, ImGui reverts to the (quite ugly) default ImGui font.
One way to fix this is to add this line to your Build.cs file:
Build.cs
RuntimeDependencies.Add(Path.Combine(EngineDirectory, "Content/Slate/Fonts/Roboto-Regular.ttf"), StagedFileType.NonUFS);
Specifically, this needs to be of type NonUFS so that the file can be found using regular file operations, not just using the Unreal file system.
Hey hey, this should be fixed with https://github.com/VesCodes/ImGui/commit/e203fc7cb48d1a847a5186c22ee31a5c9c69177c
ImGuiContext.cpp
references the TTF file directly like this:This works fine in editor and non-staged builds, however as soon as you stage and/or package, ImGui reverts to the (quite ugly) default ImGui font.
One way to fix this is to add this line to your
Build.cs
file:Specifically, this needs to be of type NonUFS so that the file can be found using regular file operations, not just using the Unreal file system.