mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2026-03-08 01:07:03 +01:00
13 lines
473 B
Python
13 lines
473 B
Python
from PIL import Image, ImageDraw, ImageFont
|
|
|
|
text = "BN0"
|
|
# font = ImageFont.load("./flippigator/fonts/helvB08.pil")
|
|
font = ImageFont.truetype("./flippigator/fonts/haxrcorp_4089.ttf", size=16)
|
|
# font = ImageFont.load_path("FuBar-Bold.pil") # searches for a bitmap font along the Python path.
|
|
img = Image.new("L", font.getsize(text), 255)
|
|
dctx = ImageDraw.Draw(img)
|
|
dctx.text((0, 0), text, font=font)
|
|
del dctx
|
|
# img = img.resize((img.width * 8, img.height * 8))
|
|
img.show()
|