Use Type Writer font on the OLED screen (Author: Mandy Smith) (#377)

* Use Type Writer font on the OLED screen

* Add README crediting Mandy Smith + note on permission
This commit is contained in:
Daniel Markstedt 2021-10-25 15:41:36 -07:00 committed by GitHub
parent e3794619b4
commit 7725556626
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,4 @@
type_writer.ttf
"Type Writer" TrueType font by Mandy Smith
Source: https://www.dafont.com/type-writer.font
Distributed under BSD 3-Clause by permission from author (see LICENSE for full text)

View File

@ -123,18 +123,19 @@ draw.rectangle((0,0,WIDTH,HEIGHT), outline=0, fill=0)
# Draw some shapes.
# First define some constants to allow easy resizing of shapes.
padding = -2
padding = 0
top = padding
bottom = HEIGHT-padding
# Move left to right keeping track of the current x position for drawing shapes.
x = 0
# Load default font.
font = ImageFont.load_default()
#font = ImageFont.load_default()
# Alternatively load a TTF font. Make sure the .ttf font file is in the same directory as the python script!
# When using other fonds, you may need to adjust padding, font size, and line spacing
# Some other nice fonts to try: http://www.dafont.com/bitmap.php
# font = ImageFont.truetype('Minecraftia.ttf', 8)
font = ImageFont.truetype('type_writer.ttf', 8)
def device_list():

Binary file not shown.