Skip to content

Commit 7b54c98

Browse files
committed
style: update font stacks to use liberation and source sans fonts
1 parent a5238f8 commit 7b54c98

18 files changed

Lines changed: 36 additions & 37 deletions

Dockerfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,27 @@ RUN CGO_ENABLED=0 go build \
2727
# =============================================================================
2828
FROM chromedp/headless-shell:stable
2929

30-
# Install CA certificates, fontconfig, emoji, and download quality fonts
31-
# - Inter: Modern sans-serif, close to Apple's San Francisco
32-
# - JetBrains Mono: Excellent monospace for code
30+
# Install CA certificates, fontconfig, emoji, and fonts
31+
# - fonts-liberation: Metric-compatible with Arial, Times New Roman, Courier New
32+
# - fonts-texgyre: High-quality alternatives (TeX Gyre Schola for Georgia)
33+
# - Source Sans 3: Light, modern sans-serif for default/technical/creative styles
34+
# - JetBrains Mono: Excellent monospace for code blocks
3335
# - fonts-noto-color-emoji: Color emoji support
3436
RUN apt-get update && apt-get install -y --no-install-recommends \
3537
ca-certificates \
3638
fontconfig \
39+
fonts-liberation \
40+
fonts-texgyre \
3741
fonts-noto-color-emoji \
3842
curl \
3943
unzip \
4044
&& rm -rf /var/lib/apt/lists/* \
41-
# Download and install Inter font
42-
&& curl -sL https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip -o /tmp/inter.zip \
43-
&& unzip -q /tmp/inter.zip -d /tmp/inter \
44-
&& mkdir -p /usr/share/fonts/truetype/inter \
45-
&& cp /tmp/inter/Inter.ttc /usr/share/fonts/truetype/inter/ \
46-
&& rm -rf /tmp/inter /tmp/inter.zip \
45+
# Download and install Source Sans 3 font
46+
&& curl -sL "https://github.com/adobe-fonts/source-sans/releases/download/3.052R/OTF-source-sans-3.052R.zip" -o /tmp/sourcesans.zip \
47+
&& unzip -q /tmp/sourcesans.zip -d /tmp/sourcesans \
48+
&& mkdir -p /usr/share/fonts/opentype/source-sans-3 \
49+
&& cp /tmp/sourcesans/OTF/*.otf /usr/share/fonts/opentype/source-sans-3/ \
50+
&& rm -rf /tmp/sourcesans /tmp/sourcesans.zip \
4751
# Download and install JetBrains Mono font
4852
&& curl -sL https://github.com/JetBrains/JetBrainsMono/releases/download/v2.304/JetBrainsMono-2.304.zip -o /tmp/jbmono.zip \
4953
&& unzip -q /tmp/jbmono.zip -d /tmp/jbmono \

cssbuilders.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// defaultFontFamily is the standard font stack for PDF footers and generated content.
9-
const defaultFontFamily = "'Inter', sans-serif"
9+
const defaultFontFamily = "sans-serif"
1010

1111
// watermarkFontSize is the font size for watermark text overlay.
1212
const watermarkFontSize = "8rem"

examples/simple-academic.pdf

0 Bytes
Binary file not shown.

examples/simple-corporate.pdf

-1 Bytes
Binary file not shown.

examples/simple-creative.pdf

-1 Bytes
Binary file not shown.

examples/simple-default.pdf

-1 Bytes
Binary file not shown.

examples/simple-invoice.pdf

-1 Bytes
Binary file not shown.

examples/simple-legal.pdf

-1 Bytes
Binary file not shown.

examples/simple-manuscript.pdf

0 Bytes
Binary file not shown.

examples/simple-technical.pdf

-1 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)