2 inkyphat
Benedikt Kristinsson edited this page 2020-05-08 22:42:58 +02:00

Examples

Write text

Uses monospace font

#!/usr/bin/env python3

from PIL import ImageFont
import inkyphat

if __name__ == "__main__":
    inkyphat.set_colour("red")
    font = inkyphat.ImageFont.truetype(inkyphat.fonts.PressStart2P, 8)
    xy = (10, 10)
    text = "woof woof"
    fill = inkyphat.BLACK
    inkyphat.text(xy, text, fill=fill, font=font)
    inkyphat.show()