From fc4e42662dc9b68f43ef19a028db518bcc51474b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 13 Apr 2021 19:46:20 +0200 Subject: [PATCH] UTF8 compatibility with default windows font --- gtk2_ardour/export_report.cc | 8 ++++++++ gtk2_ardour/loudness_dialog.cc | 16 ++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index f0e20aff79..1356a933b3 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -699,10 +699,18 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) layout->set_text ("\u274C"); // cross mark } 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 +#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 1e74e8565a..65a8d297dd 100644 --- a/gtk2_ardour/loudness_dialog.cc +++ b/gtk2_ardour/loudness_dialog.cc @@ -825,20 +825,28 @@ LoudnessDialog::test_conformity () l = manage (new Label ("\u274C", ALIGN_CENTER)); // cross mark l->modify_font (UIConfiguration::instance ().get_NormalMonospaceFont ()); l->modify_fg (Gtk::STATE_NORMAL, color_fail); - Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2714", 0, 0); + 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_fg (Gtk::STATE_NORMAL, color_warn); - Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2714", 0, 0); + 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 { - l = manage (new Label ("\u2714", ALIGN_CENTER)); // heavy check mark +#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->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\u2714", 0, 0); + Gtkmm2ext::set_size_request_to_display_given_text (*l, "\u274C\u2713", 0, 0); } t->attach (*l, col + 1, col + 2, row, row + 1, SHRINK, SHRINK, 2, 0);