One font to rule the rulers.

Remove bold fonts for Bar/beats and font-size
inconsistency on macOS (VerySmall, SmallBold).

This reverts commit e3dc0a24f2.
and 14318dd342
and a76afae0e9
and 7c27f617dc
and 20029ec7e6
This commit is contained in:
Robin Gareus 2025-01-23 18:58:10 +01:00
parent 3ea0b11c7d
commit 58f1d46e31
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 1 additions and 20 deletions

View file

@ -38,7 +38,6 @@ Ruler::Ruler (Canvas* c, const Metric* m)
, _upper (0)
, _divide_height (-1.0)
, _font_description (0)
, _second_font_description (0)
, _need_marks (true)
{
}
@ -50,7 +49,6 @@ Ruler::Ruler (Canvas* c, const Metric* m, Rect const& r)
, _upper (0)
, _divide_height (-1.0)
, _font_description (0)
, _second_font_description (0)
, _need_marks (true)
{
}
@ -62,7 +60,6 @@ Ruler::Ruler (Item* parent, const Metric* m)
, _upper (0)
, _divide_height (-1.0)
, _font_description (0)
, _second_font_description (0)
, _need_marks (true)
{
}
@ -74,7 +71,6 @@ Ruler::Ruler (Item* parent, const Metric* m, Rect const& r)
, _upper (0)
, _divide_height (-1.0)
, _font_description (0)
, _second_font_description (0)
, _need_marks (true)
{
}
@ -98,16 +94,6 @@ Ruler::set_font_description (Pango::FontDescription fd)
end_visual_change ();
}
void
Ruler::set_second_font_description (Pango::FontDescription fd)
{
begin_visual_change ();
delete _second_font_description;
_second_font_description = new Pango::FontDescription (fd);
end_visual_change ();
}
void
Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
{
@ -167,7 +153,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
for (vector<Mark>::const_iterator m = marks.begin(); m != marks.end(); ++m) {
Duple pos;
Pango::FontDescription* fd = (m->style == Mark::Major) ? (_second_font_description ? _second_font_description : _font_description) : _font_description;
Pango::FontDescription* fd = _font_description;
pos.x = round (m->position/_metric->units_per_pixel) + self.x0;
pos.y = self.y1; /* bottom edge */