X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/blobdiff_plain/23cf04451d7cb0d6acf6b4b55bd3f57d11c6cc24..34aec98724f8c0e6fa5a20f509744809234bf319:/examples/lcd.py?ds=sidebyside diff --git a/examples/lcd.py b/examples/lcd.py index 7e50c94..10413b9 100755 --- a/examples/lcd.py +++ b/examples/lcd.py @@ -1,7 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import ST7735 from PIL import Image, ImageDraw, ImageFont +from fonts.ttf import RobotoMedium as UserFont import logging logging.basicConfig( @@ -38,7 +39,7 @@ draw = ImageDraw.Draw(img) # Text settings. font_size = 25 -font = ImageFont.truetype("fonts/Asap/Asap-Bold.ttf", font_size) +font = ImageFont.truetype(UserFont, font_size) text_colour = (255, 255, 255) back_colour = (0, 170, 170)