From 37243ce61bd63a683727047b671d577a28a1d329 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 13 Apr 2021 23:38:54 +0200 Subject: [PATCH] Further tweaks for UTF8 font-issues on Windows --- gtk2_ardour/export_report.cc | 12 ++++++------ gtk2_ardour/loudness_dialog.cc | 20 ++++++++------------ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index 1356a933b3..7649747659 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -689,28 +689,28 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) layout->show_in_cairo_context (cr); cr->move_to (xl + w + 5, yl); - layout->set_font_description (UIConfiguration::instance ().get_LargeMonospaceFont ()); + layout->set_font_description (UIConfiguration::instance ().get_LargeFont ()); cr->set_source_rgba (.9, .9, .9, 1.0); if (lufs > pi->LUFS_range[0] || (pi->enable[0] && dbfs > pi->level[0]) || (pi->enable[1] && dbtp > pi->level[1]) ) { cr->set_source_rgba (1, 0, .0, 1.0); +#ifdef PLATFORM_WINDOWS + layout->set_text ("X"); +#else layout->set_text ("\u274C"); // cross mark +#endif } else if (lufs < pi->LUFS_range[1]) { cr->set_source_rgba (.6, .7, 0, 1.0); #ifdef PLATFORM_WINDOWS layout->set_text ("\u2713"); // check mark #else - layout->set_text ("\u2714\u26A0"); // warning sign + layout->set_text ("\u2713\u26A0"); // check mark + warning sign #endif } else { cr->set_source_rgba (.1, 1, .1, 1.0); -#ifdef PLATFORM_WINDOWS - layout->set_text ("\u2713"); // check mark -#else layout->set_text ("\u2714"); // heavy check mark -#endif } int ww, hh; layout->get_pixel_size (ww, hh); diff --git a/gtk2_ardour/loudness_dialog.cc b/gtk2_ardour/loudness_dialog.cc index 65a8d297dd..9baad02161 100644 --- a/gtk2_ardour/loudness_dialog.cc +++ b/gtk2_ardour/loudness_dialog.cc @@ -822,28 +822,24 @@ LoudnessDialog::test_conformity () || (preset.enable[0] && dbfs > preset.level[0]) || (preset.enable[1] && dbtp > preset.level[1]) ) { +#ifdef PLATFORM_WINDOWS + l = manage (new Label ("X", ALIGN_CENTER)); // cross mark +#else l = manage (new Label ("\u274C", ALIGN_CENTER)); // cross mark - l->modify_font (UIConfiguration::instance ().get_NormalMonospaceFont ()); +#endif + l->modify_font (UIConfiguration::instance ().get_BigFont ()); l->modify_fg (Gtk::STATE_NORMAL, color_fail); Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2713", 0, 0); set_tooltip (*l, "The signal is too loud."); } else if (lufs_i < preset.LUFS_range[1]) { -#ifdef PLATFORM_WINDOWS l = manage (new Label ("\u2713", ALIGN_CENTER)); // check mark -#else - l = manage (new Label ("\u2714", ALIGN_CENTER)); // heavy check mark -#endif - l->modify_font (UIConfiguration::instance ().get_NormalMonospaceFont ()); + l->modify_font (UIConfiguration::instance ().get_BigFont ()); l->modify_fg (Gtk::STATE_NORMAL, color_warn); Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2713", 0, 0); set_tooltip (*l, "The signal is too quiet, but satisfies the max. loudness spec."); } else { -#ifdef PLATFORM_WINDOWS - l = manage (new Label ("\u2714", ALIGN_CENTER)); // check mark -#else - l = manage (new Label ("\u2713", ALIGN_CENTER)); // heavy check mark -#endif - l->modify_font (UIConfiguration::instance ().get_NormalMonospaceFont ()); + l = manage (new Label ("\u2714", ALIGN_CENTER)); // heavy check mark + l->modify_font (UIConfiguration::instance ().get_BigFont ()); l->modify_fg (Gtk::STATE_NORMAL, color_good); set_tooltip (*l, "Signal loudness is within the spec."); Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2713", 0, 0);