From f0763f404bb27923d36b60765ef9936096377a5e Mon Sep 17 00:00:00 2001
From: kj_sh604
Date: Sat, 14 Mar 2026 00:38:17 -0400
Subject: refactor: `system-ui` font option
---
src/app.py | 8 ++++++--
src/templates/index.html | 3 +++
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/app.py b/src/app.py
index ce5a6e1..a587311 100644
--- a/src/app.py
+++ b/src/app.py
@@ -200,6 +200,8 @@ def build_pdf_css(
if font_family == "sans":
font_stack = "sans-serif"
+ elif font_family == "system-ui":
+ font_stack = 'system-ui, -apple-system, BlinkMacSystemFont, sans-serif'
else:
font_stack = "serif"
@@ -466,7 +468,9 @@ def convert_with_reportlab(
)
styles = getSampleStyleSheet()
- font_name = "Helvetica" if font_family == "sans" else "Times-Roman"
+ font_name = (
+ "Helvetica" if font_family in ("sans", "system-ui") else "Times-Roman"
+ )
spacing_val = float(line_spacing) if line_spacing else 1.0
body_style = ParagraphStyle(
@@ -657,7 +661,7 @@ def create_app():
)
font_family = request.form.get("main_font", "serif")
- if font_family not in ("serif", "sans"):
+ if font_family not in ("serif", "sans", "system-ui"):
font_family = "serif"
line_spacing = pick_option(
diff --git a/src/templates/index.html b/src/templates/index.html
index 9f3ea9c..490bb82 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -105,6 +105,9 @@
+
--
cgit v1.2.3