Mac: Retina OpenGL: Fix ImGui font switch, dynamic switching, toolbar fixes

This commit is contained in:
Vojtech Kral 2019-01-24 13:16:46 +01:00
parent d1c569dd57
commit 3df1ed8f6b
7 changed files with 50 additions and 20 deletions

View file

@ -205,6 +205,8 @@ void ImGuiWrapper::init_default_font(float scaling)
{
static const float font_size = 18.0f;
destroy_fonts_texture();
ImGuiIO& io = ImGui::GetIO();
io.Fonts->Clear();
ImFont* font = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSans-Regular.ttf").c_str(), font_size * scaling);