Use ArdourSans for symbols cross platform

This commit is contained in:
Robin Gareus 2022-11-07 11:56:21 +01:00
parent ef6803abd1
commit 9093059ba0
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
5 changed files with 9 additions and 52 deletions

View File

@ -130,8 +130,8 @@ AudioClock::AudioClock (const string& clock_name, bool transient, const string&
_left_btn.set_sizing_text (_("0000000000000"));
_right_btn.set_sizing_text (_("0000000000000"));
_left_btn.set_layout_font (UIConfiguration::instance().get_SmallMonospaceFont());
_right_btn.set_layout_font (UIConfiguration::instance().get_SmallMonospaceFont());
_left_btn.set_layout_font (UIConfiguration::instance().get_ArdourSmallFont());
_right_btn.set_layout_font (UIConfiguration::instance().get_ArdourSmallFont());
UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AudioClock::set_colors));
UIConfiguration::instance().DPIReset.connect (sigc::mem_fun (*this, &AudioClock::dpi_reset));
@ -1336,7 +1336,6 @@ AudioClock::set_bbt (timecnt_t const & w, bool /*force*/)
TempoMetric m (TempoMap::use()->metric_at (pos));
#ifndef PLATFORM_WINDOWS
/* UTF8 1/4 note and 1/8 note ♩ (\u2669) and ♪ (\u266a) are n/a on Windows */
if (m.tempo().note_type() == 4) {
snprintf (buf, sizeof(buf), "\u2669 = %.3f", m.tempo().note_types_per_minute_at_DOUBLE (pos));
@ -1344,9 +1343,7 @@ AudioClock::set_bbt (timecnt_t const & w, bool /*force*/)
} else if (m.tempo().note_type() == 8) {
snprintf (buf, sizeof(buf), "\u266a = %.3f", m.tempo().note_types_per_minute_at_DOUBLE (pos));
_left_btn.set_text (string_compose ("%1", buf), false);
} else
#endif
{
} else {
snprintf (buf, sizeof(buf), "1/%d = %.3f",m.tempo().note_type(), m.tempo().note_types_per_minute_at_DOUBLE (pos));
_left_btn.set_text (buf, false);
}

View File

@ -683,27 +683,15 @@ ExportReport::init (const AnalysisResults & ar, bool with_file)
/* calc max status width */
int max_wx = 10;
layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
layout->set_font_description (UIConfiguration::instance ().get_ArdourLargeFont ());
#if (defined PLATFORM_WINDOWS || defined __APPLE__)
layout->set_text ("X");
#else
layout->set_text ("\u274C"); // cross mark
#endif
layout->get_pixel_size (w, h);
max_wx = std::max (max_wx, w);
#ifdef PLATFORM_WINDOWS
layout->set_text ("\u2713"); // check mark
#else
layout->set_text ("\U0001F509"); // speaker icon w/1 bar
#endif
layout->get_pixel_size (w, h);
max_wx = std::max (max_wx, w);
#ifdef __APPLE__
layout->set_text ("\u2713"); // check mark
#else
layout->set_text ("\u2714"); // heavy check mark
#endif
layout->get_pixel_size (w, h);
max_wx = std::max (max_wx, w);
@ -773,32 +761,20 @@ 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_LargeFont ());
layout->set_font_description (UIConfiguration::instance ().get_ArdourLargeFont ());
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);
#if (defined PLATFORM_WINDOWS || defined __APPLE__)
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 ("\U0001F509"); // speaker icon w/1 bar
#endif
} else {
cr->set_source_rgba (.1, 1, .1, 1.0);
#ifdef __APPLE__
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

@ -819,30 +819,18 @@ 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
#endif
l->modify_font (UIConfiguration::instance ().get_BigFont ());
l->modify_font (UIConfiguration::instance ().get_ArdourBigFont ());
l->modify_fg (Gtk::STATE_NORMAL, color_fail);
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 ("\U0001F509", ALIGN_CENTER)); // speaker icon w/1 bar
#endif
l->modify_font (UIConfiguration::instance ().get_BigFont ());
l->modify_font (UIConfiguration::instance ().get_ArdourBigFont ());
l->modify_fg (Gtk::STATE_NORMAL, color_warn);
set_tooltip (*l, "The signal is too quiet, but satisfies the max. loudness spec.");
} else {
#ifdef __APPLE__
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_BigFont ());
l->modify_font (UIConfiguration::instance ().get_ArdourBigFont ());
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);

View File

@ -802,11 +802,7 @@ RegionView::make_name () const
}
if (_region->muted()) {
#ifdef __APPLE__
str = string ("!") + str;
#else
str = std::string("\U0001F507") + str; // SPEAKER WITH CANCELLATION STROKE
#endif
}
return str;

View File

@ -73,7 +73,7 @@ double TimeAxisViewItem::NAME_HIGHLIGHT_THRESH;
void
TimeAxisViewItem::set_constant_heights ()
{
NAME_FONT = Pango::FontDescription (UIConfiguration::instance().get_SmallFont());
NAME_FONT = Pango::FontDescription (UIConfiguration::instance().get_ArdourSmallFont());
Gtk::Window win;
Gtk::Label foo;