Add check for OS to get font
For some reason in Windows, the root directory is /terravisor, but in Linux it's /terravisor/build. Idk why it is that way in Windows.
This commit is contained in:
parent
fa24633a9e
commit
af7fa08016
|
@ -21,8 +21,12 @@ void ApplyUIScaling(GLFWwindow* window) {
|
|||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.Fonts->Clear();
|
||||
std::cout << "Current Path: " << std::filesystem::current_path() << std::endl;
|
||||
|
||||
#ifdef _WIN32
|
||||
io.Fonts->AddFontFromFileTTF("imgui/misc/fonts/JetBrainsMono/JetBrainsMono-Medium.ttf", 8.0f * scale);
|
||||
|
||||
#else
|
||||
io.Fonts->AddFontFromFileTTF("../imgui/misc/fonts/JetBrainsMono/JetBrainsMono-Medium.ttf", 8.0f * scale);
|
||||
#endif
|
||||
io.Fonts->Build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue