mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 13:34:40 +00:00
41 lines
1.2 KiB
Bash
41 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
exists() { command -v "$1" >/dev/null 2>&1; }
|
|
|
|
echo "[i] Checking environment..."
|
|
for c in fc-list pdffonts tectonic; do
|
|
if ! exists "$c"; then
|
|
echo " - $c: NOT FOUND (optional but recommended: sudo apt install -y fontconfig poppler-utils tectonic)"
|
|
else
|
|
echo " - $c: OK"
|
|
fi
|
|
done
|
|
|
|
echo "[i] Listing local ./fonts content:"
|
|
ls -l ./fonts 2>/dev/null || echo " (no ./fonts directory)"
|
|
|
|
if exists fc-list; then
|
|
echo "[i] System fonts (grep Garamond|Cinzel|FELL):"
|
|
fc-list | grep -Ei "Garamond|Cinzel|Fell" || echo " (none found in system)"
|
|
fi
|
|
|
|
pdfs=(dj_cheat_sheet_transitions.pdf dj_tracklist.pdf dj_mini_sheet.pdf dj_notes.pdf dj_setup_mapping.pdf dj_one_laptop_fallback.pdf dj_rider.pdf dj_podrecznik.pdf)
|
|
if exists pdffonts; then
|
|
for p in "${pdfs[@]}"; do
|
|
[ -f "$p" ] || continue
|
|
echo "[i] Fonts embedded in $p:"
|
|
pdffonts "$p" || true
|
|
done
|
|
else
|
|
echo "[!] pdffonts not installed; cannot list embedded fonts."
|
|
fi
|
|
|
|
echo "[i] Grepping last Tectonic log (if any .log files exist)..."
|
|
logs=$(ls -1 *.log 2>/dev/null || true)
|
|
if [ -n "$logs" ]; then
|
|
grep -Ei "fontspec|warning|not found" *.log || echo " (no relevant warnings)"
|
|
else
|
|
echo " (no .log files)"
|
|
fi
|