Skip to content

Commit

Permalink
Merge pull request #7 from si458/fix-textsize-scroller
Browse files Browse the repository at this point in the history
fix textsize scroller
  • Loading branch information
crismc committed Dec 31, 2023
2 parents 22e89b3 + aeb8d2f commit 693243f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/Scroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def render(self):

# Calculate width but skip drawing if off the left side of screen.
if x < -10:
char_width, char_height = self.display.draw.textsize(c, font=self.font)
char_width, char_height = Utils.get_text_size(self.display, c, font=self.font)
x += char_width
continue

Expand All @@ -37,7 +37,7 @@ def render(self):
self.display.draw.text((x, y), c, font=self.font, fill=255)

# Increment x position based on chacacter width.
char_width, char_height = self.display.draw.textsize(c, font=self.font)
char_width, char_height = Utils.get_text_size(self.display, c, font=self.font)
x += char_width

def move_for_next_frame(self, allow_startover):
Expand Down

0 comments on commit 693243f

Please sign in to comment.