Spaces:
Sleeping
Sleeping
Siyuan Hu
commited on
Commit
·
e3a1bdb
1
Parent(s):
a803c6c
build(space): install fonts-raleway and fonts-lato in postBuild to satisfy fontspec without modifying template
Browse files- postBuild +8 -0
- template/beamerthemegemini.sty +31 -9
postBuild
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
#!/usr/bin/env bash
|
| 2 |
set -euo pipefail
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
echo "[postBuild] Installing Tectonic"
|
| 5 |
bash install_tectonic.sh || echo "[postBuild] Tectonic install script returned non-zero; continuing."
|
| 6 |
|
|
|
|
| 1 |
#!/usr/bin/env bash
|
| 2 |
set -euo pipefail
|
| 3 |
|
| 4 |
+
echo "[postBuild] Installing system fonts (Raleway, Lato) for fontspec"
|
| 5 |
+
if command -v apt-get >/dev/null 2>&1; then
|
| 6 |
+
apt-get update && apt-get install -y fonts-raleway fonts-lato fonts-dejavu-core fonts-dejavu-extra || true
|
| 7 |
+
fc-cache -f -v || true
|
| 8 |
+
else
|
| 9 |
+
echo "[postBuild] apt-get not available; skipping font install"
|
| 10 |
+
fi
|
| 11 |
+
|
| 12 |
echo "[postBuild] Installing Tectonic"
|
| 13 |
bash install_tectonic.sh || echo "[postBuild] Tectonic install script returned non-zero; continuing."
|
| 14 |
|
template/beamerthemegemini.sty
CHANGED
|
@@ -15,17 +15,39 @@
|
|
| 15 |
% Fonts
|
| 16 |
% ====================
|
| 17 |
|
| 18 |
-
|
| 19 |
-
\newfontfamily\Lato[Ligatures=TeX]{Lato}
|
| 20 |
-
|
| 21 |
\usefonttheme{professionalfonts}
|
| 22 |
|
| 23 |
-
\
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
\setbeamerfont{headline}{family=\Raleway}
|
| 31 |
\setbeamerfont{headline title}{size=\Huge,series=\bfseries}
|
|
|
|
| 15 |
% Fonts
|
| 16 |
% ====================
|
| 17 |
|
| 18 |
+
% Prefer Raleway/Lato if available; otherwise fall back to DejaVu or Latin Modern Sans
|
|
|
|
|
|
|
| 19 |
\usefonttheme{professionalfonts}
|
| 20 |
|
| 21 |
+
\IfFontExistsTF{Raleway}{
|
| 22 |
+
\newfontfamily\Raleway[Ligatures=TeX]{Raleway}
|
| 23 |
+
}{
|
| 24 |
+
\newfontfamily\Raleway[Ligatures=TeX]{DejaVu Sans}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
\IfFontExistsTF{Lato}{
|
| 28 |
+
\newfontfamily\Lato[Ligatures=TeX]{Lato}
|
| 29 |
+
}{
|
| 30 |
+
\newfontfamily\Lato[Ligatures=TeX]{DejaVu Sans}
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
\IfFontExistsTF{Lato}{
|
| 34 |
+
\setsansfont{Lato}[
|
| 35 |
+
UprightFont=*-Light,
|
| 36 |
+
ItalicFont=*-LightItalic,
|
| 37 |
+
BoldFont=*-Regular,
|
| 38 |
+
BoldItalicFont=*-Italic
|
| 39 |
+
]
|
| 40 |
+
}{
|
| 41 |
+
\IfFontExistsTF{DejaVu Sans}{
|
| 42 |
+
\setsansfont{DejaVu Sans}[
|
| 43 |
+
BoldFont=*-Bold,
|
| 44 |
+
ItalicFont=*-Oblique,
|
| 45 |
+
BoldItalicFont=*-BoldOblique
|
| 46 |
+
]
|
| 47 |
+
}{
|
| 48 |
+
\setsansfont{Latin Modern Sans}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
|
| 52 |
\setbeamerfont{headline}{family=\Raleway}
|
| 53 |
\setbeamerfont{headline title}{size=\Huge,series=\bfseries}
|