Skip to content

Commit 05c8a9f

Browse files
committed
Removal of the get_ascent reference, and the get_ascent function
1 parent b69892a commit 05c8a9f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

adafruit_display_text/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def __init__(
245245
if self.base_alignment:
246246
self._y_offset = 0
247247
else:
248-
self._y_offset = self._get_ascent() // 2
248+
self._y_offset = self._ascent // 2
249249

250250
def _get_ascent_descent(self) -> Tuple[int, int]:
251251
""" Private function to calculate ascent and descent font values """
@@ -268,9 +268,6 @@ def _get_ascent_descent(self) -> Tuple[int, int]:
268268
descender_max = max(descender_max, -this_glyph.dy)
269269
return ascender_max, descender_max
270270

271-
def _get_ascent(self) -> int:
272-
return self._get_ascent_descent()[0]
273-
274271
@property
275272
def font(self) -> None:
276273
"""Font to use for text display."""

0 commit comments

Comments
 (0)