feat: departure board image and vendored Roboto fonts
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
1 parent
e199600140
commit
baaaeff917
10 files changed
+425
-6
No files matched your search
@@ -30,13 +30,15 @@ MONTHS = ["ledna", "února", "března", "dubna", "května", "června",
|
||||
SS = 4 # supersampling factor for the dial (smooth edges on a 320x480 panel)
|
||||
|
||||
|
||||
def load_fonts(lib: str) -> dict:
|
||||
root = f"{lib}/res/fonts"
|
||||
def load_fonts(font_dir: str) -> dict:
|
||||
def f(name: str, size: int) -> ImageFont.FreeTypeFont:
|
||||
return ImageFont.truetype(f"{font_dir}/{name}", size)
|
||||
|
||||
return {
|
||||
"time": ImageFont.truetype(f"{root}/roboto/Roboto-Light.ttf", 56),
|
||||
"weekday": ImageFont.truetype(f"{root}/roboto/Roboto-Medium.ttf", 24),
|
||||
"date": ImageFont.truetype(f"{root}/roboto/Roboto-Regular.ttf", 28),
|
||||
"year": ImageFont.truetype(f"{root}/roboto/Roboto-Light.ttf", 22),
|
||||
"time": f("Roboto-Light.ttf", 56),
|
||||
"weekday": f("Roboto-Medium.ttf", 24),
|
||||
"date": f("Roboto-Regular.ttf", 28),
|
||||
"year": f("Roboto-Light.ttf", 22),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user