mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 08:29:59 +00:00
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:
parent
e3794619b4
commit
7725556626
4
src/oled_monitor/fonts.README
Normal file
4
src/oled_monitor/fonts.README
Normal 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)
|
@ -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():
|
||||
|
BIN
src/oled_monitor/type_writer.ttf
Normal file
BIN
src/oled_monitor/type_writer.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user