UTF8 compatibility with default windows font

This commit is contained in:
Robin Gareus 2021-04-13 19:46:20 +02:00
parent ec64112fb9
commit fc4e42662d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 20 additions and 4 deletions

View File

@ -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);

View File

@ -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);