diff --git a/android/app/build.gradle b/android/app/build.gradle index 694b9a681..6f92d25f9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -99,7 +99,6 @@ dependencies { copyResources.dependsOn deleteTempAssets copyPipelines.dependsOn deleteTempAssets -copyFonts.dependsOn deleteTempAssets copyCfg.dependsOn deleteTempAssets copyPlugins_arm64v8a.dependsOn deleteTempAssets @@ -109,7 +108,6 @@ copyPlugins_x86_64.dependsOn deleteTempAssets preBuild.dependsOn copyResources preBuild.dependsOn copyPipelines -preBuild.dependsOn copyFonts preBuild.dependsOn copyCfg preBuild.dependsOn copyPlugins_arm64v8a diff --git a/resources/fonts/Roboto-Medium.ttf b/resources/fonts/Roboto-Medium.ttf new file mode 100644 index 000000000..ac0f908b9 Binary files /dev/null and b/resources/fonts/Roboto-Medium.ttf differ diff --git a/src-core/core/style.cpp b/src-core/core/style.cpp index ee2f9dc0a..dc5962073 100644 --- a/src-core/core/style.cpp +++ b/src-core/core/style.cpp @@ -24,7 +24,7 @@ namespace style ImGui::GetStyle().PopupRounding = round; ImGui::GetStyle().ScrollbarRounding = round; - setFonts(resources::getResourcePath("fonts/font.ttf")); + setFonts(); ImGui::StyleColorsDark(); // ImGui::StyleColorsLight(); @@ -42,7 +42,7 @@ namespace style ImGui::GetStyle().PopupRounding = round; ImGui::GetStyle().ScrollbarRounding = round; - setFonts(resources::getResourcePath("fonts/font.ttf")); + setFonts(); ImGui::StyleColorsLight(); @@ -109,7 +109,7 @@ namespace style ImGui::GetStyle().PopupRounding = round; ImGui::GetStyle().ScrollbarRounding = round; - setFonts(resources::getResourcePath("fonts/font.ttf")); + setFonts(); ImGui::StyleColorsDark(); @@ -180,12 +180,12 @@ namespace style ImGui::PopStyleColor(3); } - void setFonts(std::string fontName) + void setFonts() { static const ImWchar ranges[] = {0x20, 0xFFFF, 0}; static ImFontConfig config; - baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 16.0f * ui_scale, &config, ranges); - bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 45.0f * ui_scale, &config, ranges); - hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(fontName.c_str(), 128.0f * ui_scale, &config, ranges); + baseFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/font.ttf").c_str(), 16.0f * ui_scale, &config, ranges); + bigFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/Roboto-Medium.ttf").c_str(), 45.0f * ui_scale); //, &config, ranges); + hugeFont = ImGui::GetIO().Fonts->AddFontFromFileTTF(resources::getResourcePath("fonts/Roboto-Medium.ttf").c_str(), 128.0f * ui_scale); //, &config, ranges); } } \ No newline at end of file diff --git a/src-core/core/style.h b/src-core/core/style.h index 27036c163..bb593af32 100644 --- a/src-core/core/style.h +++ b/src-core/core/style.h @@ -14,5 +14,5 @@ namespace style bool setDarkStyle(float dpi_scaling = 1.0f); void beginDisabled(); void endDisabled(); - void setFonts(std::string fontName); + void setFonts(); } \ No newline at end of file diff --git a/src-interface/viewer/viewer_projection.cpp b/src-interface/viewer/viewer_projection.cpp index ba58efae2..590a4b4b2 100644 --- a/src-interface/viewer/viewer_projection.cpp +++ b/src-interface/viewer/viewer_projection.cpp @@ -159,6 +159,8 @@ namespace satdump { projection_layers.erase(projection_layers.begin() + i); ImGui::EndGroup(); + ImGui::PopStyleColor(); + ImGui::PopStyleColor(); break; } ImGui::PopStyleColor();