aboutsummaryrefslogtreecommitdiffstats
path: root/deckit/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'deckit/server.py')
-rw-r--r--deckit/server.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/deckit/server.py b/deckit/server.py
index bd46446..8f6a39f 100644
--- a/deckit/server.py
+++ b/deckit/server.py
@@ -131,9 +131,11 @@ _font = {}
def nerd_font():
- """The Nerd Font the canvas draws its icons with, for the tablet."""
+ """The Nerd Font the canvas draws its icons with, for the tablet. Propo:
+ each icon's advance is its ink, so a centred glyph is centred (the plain
+ variant's icons overflow their advance to the right)."""
if "p" not in _font:
- out = _run(["fc-match", "-f", "%{file}", "Inconsolata Nerd Font:style=Regular"])
+ out = _run(["fc-match", "-f", "%{file}", "Inconsolata Nerd Font Propo:style=Regular"])
# fc-match falls back to any font; only a Nerd Font has the glyphs.
found = "NerdFont" in out.replace(" ", "") and Path(out).is_file()
if not found:
@@ -217,7 +219,7 @@ class Handler(BaseHTTPRequestHandler):
name = path[len("/icons/"):].removesuffix(".svg")
icon = icon_path(name)
return self._send(200, icon.read_bytes(), "image/svg+xml") if icon else self._send(404)
- if path == "/fonts/nerd.ttf":
+ if path == "/fonts/nerd-propo.ttf":
f = nerd_font()
return self._send(200, f.read_bytes(), "font/ttf", cache=True) if f else self._send(404)
if path.startswith("/fonts/") and path[len("/fonts/"):] in theme.CLOCK_FONTS: