From e3dc0a24f28620b9cbbfd94a35dcede73560f83d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 29 Nov 2022 09:43:26 -0700 Subject: [PATCH] canvas ruler: use second font description appropriately --- libs/canvas/ruler.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libs/canvas/ruler.cc b/libs/canvas/ruler.cc index 387705310e..e7cd6f4e8d 100644 --- a/libs/canvas/ruler.cc +++ b/libs/canvas/ruler.cc @@ -165,7 +165,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr cr) const for (vector::const_iterator m = marks.begin(); m != marks.end(); ++m) { Duple pos; - Pango::FontDescription* fd = _font_description; + Pango::FontDescription* fd = (m->style == Mark::Major) ? (_second_font_description ? _second_font_description : _font_description) : _font_description; pos.x = floor ((m->position - _lower) / _metric->units_per_pixel); pos.y = self.y1; /* bottom edge */ @@ -211,9 +211,6 @@ Ruler::render (Rect const & area, Cairo::RefPtr cr) const } else { cr->rel_line_to (0, -height); } - if (_second_font_description) { - fd = _second_font_description; - } break; case Mark::Minor: cr->rel_line_to (0, -height/3.0);