Skip to content

Instantly share code, notes, and snippets.

@paalbra
paalbra / zzh.md
Last active January 6, 2025 15:56
Electrolama zzh
@paalbra
paalbra / akkurat_na.py
Created February 4, 2025 09:48
Scrolling banner text
import os
import numpy as np
from PIL import Image, ImageDraw, ImageFont
def gettextwidth(font, text):
x_min, y_min, x_max, y_max = font.getbbox(text)
return (x_max - x_min, y_max - y_min)