diff --git a/py/hexagram/speedo.py b/py/hexagram/speedo.py index 98524b3..b9b1d68 100644 --- a/py/hexagram/speedo.py +++ b/py/hexagram/speedo.py @@ -41,3 +41,18 @@ class Speedo(Dial): for speed in range(0, int(self.max_value)+1, 20): self.draw_number(cr, 0.68, speed, "%d" % int(speed)) + + def draw_fg(self, cr: cairo.Context): + super().draw_fg(cr) + + cr.select_font_face("Muli", + cairo.FontSlant.ITALIC, + cairo.FontWeight.BOLD) + + cr.set_font_size(self.radius * 0.15) + cr.set_source_rgb(1, 0.4, 1) + + cr.move_to(self.x - (self.radius * 0.21), + self.y + (self.radius * 0.05)) + + cr.show_text("%d mph" % self.value)