File size: 212 Bytes
902a99d | 1 2 3 4 5 6 7 8 | from pathlib import Path
from PIL import ImageFont
_FONT = Path(__file__).resolve().parent / 'fonts' / 'DejaVuSansMono.ttf'
def load_font(size):
return ImageFont.FreeTypeFont(str(_FONT), max(9, int(size)))
|