GetIO().FontDefault property missing setter.
Closed this issue · 1 comments
BinarySpike commented
This is the format I identified for loading and changing a font:
var fontPtr = ImGui.GetIO().Fonts.AddFontFromFileTTF(@"path/to/font.ttf", 48f);
rlImGui.ReloadFonts();
unsafe {
ImGui.GetIO().NativePtr->FontDefault = fontPtr.NativePtr;
}
Based on the Dear Imgui Demo
However, rlImGui-cs doesn't have the property setter on ImGuiIOPtr
Is there a cleaner way or can we add this to the README?
JeffM2501 commented
This is actually an issue with ImGui.net, not rlImGui, as we don't expose things in ImGui, just setup ImGui to use raylib. I don't think we need to bring up this in the rlImGui readme, because it's a general ImGui useage issue and not specific to this backend.
That said I've added a callback that you can install to insert new fonts during startup and not have to force the font to reload.