Skip to content

Commit 7234982

Browse files
committed
Merge branch 'adafruit_master' into directional_label
# Conflicts: # adafruit_display_text/__init__.py
2 parents 87272aa + 1f3dc11 commit 7234982

File tree

5 files changed

+16827
-7
lines changed

5 files changed

+16827
-7
lines changed

adafruit_display_text/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"""
66
Display Text module helper functions
77
"""
8-
98
try:
109
from typing import Tuple
1110
except ImportError:
@@ -297,12 +296,12 @@ def background_color(self) -> int:
297296
"""Color of the background as an RGB hex number."""
298297
return self._background_color
299298

300-
def _set_background_color(self, new_color: int) -> None:
299+
def _set_background_color(self, new_color):
301300
# subclasses should override this
302301
pass
303302

304303
@background_color.setter
305-
def background_color(self, new_color: int):
304+
def background_color(self, new_color: int) -> None:
306305
self._set_background_color(new_color)
307306

308307
@property

adafruit_display_text/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, font, **kwargs) -> None:
7878
super().__init__(font, **kwargs)
7979

8080
max_glyphs = kwargs.get("max_glyphs", None)
81-
text = kwargs.get("text", None)
81+
text = kwargs.get("text", "")
8282

8383
if not max_glyphs and not text:
8484
raise RuntimeError("Please provide a max size, or initial text")

examples/display_text_label_align_baseline_comparison.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# Font definition. You can choose any two fonts available in your system
1717
MEDIUM_FONT = bitmap_font.load_font("LeagueSpartan-Bold-16.bdf")
18-
BIG_FONT = bitmap_font.load_font("IBMPlexMono-Medium-24_jep.bdf")
18+
BIG_FONT = bitmap_font.load_font("LibreBodoniv2002-Bold-27.bdf")
1919

2020
TEXT_RIGHT = "MG"
2121
TEXT_LEFT = "32.47"
@@ -40,7 +40,7 @@
4040
text=TEXT_RIGHT,
4141
color=0x000000,
4242
background_color=0x999999,
43-
x=80,
43+
x=90,
4444
y=50,
4545
base_alignment=False,
4646
)
@@ -63,7 +63,7 @@
6363
text=TEXT_RIGHT,
6464
color=0x000000,
6565
background_color=0x999999,
66-
x=80,
66+
x=90,
6767
y=100,
6868
base_alignment=True,
6969
)

0 commit comments

Comments
 (0)