mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2026-03-09 09:47:04 +01:00
12 lines
471 B
Python
12 lines
471 B
Python
from PIL import Image, ImageFont, ImageDraw
|
|
|
|
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() |