-
Notifications
You must be signed in to change notification settings - Fork 6
Add font customization #47
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
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.
One small request, but otherwise looks ready to go!
adafruit_max7219/matrices.py
Outdated
""" | ||
Draw text in the 8x8 matrix. | ||
|
||
:param str strg: string to place in to display | ||
:param int xpos: x position of LED in matrix | ||
:param int ypos: y position of LED in matrix | ||
:param int bit_value: > 1 sets the text, otherwise resets | ||
:param str font_name: path to binary font file (default: "font5x8.bin") |
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.
My understanding based on looking how FrameBuffer.text()
works is that once the font is set for the Matrix8x8
it can't be changed, and it is set on the first call to this method. It may be helpful then to add that fact here to prevent future confusion.
I am going to unlink the issue though, since that seems to be more of a problem with the default font not being included rather than the ability to alter it. |
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.
I added a note about the font not being able to be changed after the first time.
This looks good to me now.
Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.5.12 from 1.5.11: > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#47 from jerr0328/fix-36 Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 2.2.16 from 2.2.15: > Merge pull request adafruit/Adafruit_CircuitPython_turtle#35 from rrahkola/dev/add_type_annotations Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
The font is bundled in the framebuf dependency's examples (see: adafruit/Adafruit_CircuitPython_framebuf#11)
I don't have this board to test with, just contributing from Europython 2023 Sprints 👋