diff --git a/wasp/boards/simulator/test_unit.py b/wasp/boards/simulator/test_unit.py index 940edba..f292c9a 100644 --- a/wasp/boards/simulator/test_unit.py +++ b/wasp/boards/simulator/test_unit.py @@ -53,7 +53,7 @@ def test_font_width(draw): for f in (fonts.sans24, fonts.sans28, fonts.sans36): draw.set_font(f) - assert 3 == draw.bounding_box('0000')[0] % 4 + assert 0 == draw.bounding_box('0000')[0] % 4 if f.max_ch() >= 90: assert draw.bounding_box('IIII')[0] < draw.bounding_box('WWWW')[0] diff --git a/wasp/draw565.py b/wasp/draw565.py index f831b04..50f5547 100644 --- a/wasp/draw565.py +++ b/wasp/draw565.py @@ -75,7 +75,7 @@ def _bounding_box(s, font): return (0, font.height()) get_ch = font.get_ch - w = len(s) - 1 + w = len(s) for ch in s: (_, h, wc) = get_ch(ch) w += wc