mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Merge pull request #643 from Krowe-moh/patch-1
Some checks are pending
FModel QA Builder / build (push) Waiting to run
Some checks are pending
FModel QA Builder / build (push) Waiting to run
This commit is contained in:
commit
bd2e924925
|
|
@ -66,9 +66,19 @@ public class ImGuiController : IDisposable
|
|||
var iniFileNamePtr = Marshal.StringToCoTaskMemUTF8(Path.Combine(UserSettings.Default.OutputDirectory, ".data", "imgui.ini"));
|
||||
io.NativePtr->IniFilename = (byte*)iniFileNamePtr;
|
||||
}
|
||||
FontNormal = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 16 * DpiScale);
|
||||
FontBold = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeuib.ttf", 16 * DpiScale);
|
||||
FontSemiBold = io.Fonts.AddFontFromFileTTF("C:\\Windows\\Fonts\\seguisb.ttf", 16 * DpiScale);
|
||||
|
||||
// If not found, Fallback to default ImGui Font
|
||||
var normalPath = @"C:\Windows\Fonts\segoeui.ttf";
|
||||
var boldPath = @"C:\Windows\Fonts\segoeuib.ttf";
|
||||
var semiBoldPath = @"C:\Windows\Fonts\seguisb.ttf";
|
||||
|
||||
if (File.Exists(normalPath))
|
||||
FontNormal = io.Fonts.AddFontFromFileTTF(normalPath, 16 * DpiScale);
|
||||
if (File.Exists(boldPath))
|
||||
FontBold = io.Fonts.AddFontFromFileTTF(boldPath, 16 * DpiScale);
|
||||
if (File.Exists(semiBoldPath))
|
||||
FontSemiBold = io.Fonts.AddFontFromFileTTF(semiBoldPath, 16 * DpiScale);
|
||||
|
||||
io.Fonts.AddFontDefault();
|
||||
io.Fonts.Build(); // Build font atlas
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user