-
Notifications
You must be signed in to change notification settings - Fork 36
Fix rectangle size, add font support #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ence it as a file! (code moved from unsupported https://github.com/adafruit/micropython-adafruit-bitmap-font to here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! I've tested this with a modified SSD1306 library (to use this instead of framebuf) using a 128x32 / 128x64 oled display and with the current SSD1306 examples and found no issues.
adafruit_framebuf.py
Outdated
@@ -223,9 +225,81 @@ def scroll(self): | |||
"""scroll is not yet implemented""" | |||
raise NotImplementedError() | |||
|
|||
def text(self): | |||
def text(self, string, x, y, color, *, | |||
font_name="font5x8.bin"): | |||
"""text is not yet implemented""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment for "text is not yet implemented" could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh good catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fixed, please approve the PR if its good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent!
ive joined https://github.com/adafruit/micropython-adafruit-bitmap-font into framebuf cause i feel like if you're going to draw text, you'll want lines and pixels too!
i've also fixed the ustruct thingy