PuzzleMixEscape / level /_shared /common /font_utils.py
r1234chen's picture
Mirror PuzzleMixEscape GitHub main at c456a7d (1/7)
34c32eb verified
Raw History Blame Contribute Delete
254 Bytes
from pathlib import Path
from PIL import ImageFont
_FONT = Path(__file__).resolve().parents[3] / 'runtime' / 'native_runtime' / 'fonts' / 'DejaVuSansMono.ttf'
def load_font(size):
return ImageFont.FreeTypeFont(str(_FONT), max(9, int(size)))