fix: check the fonts by the files LibreOffice opens, not by fc-list

The validator asked fc-list whether Liberation Sans, Carlito and Caladea
were installed. fc-list belongs to the fontconfig package, which nothing
in this classroom pulls in, so the check could only ever fail — and it
did, twenty-odd minutes into a release run, for a reason that had
nothing to do with the fonts. They were all present the whole time.

Asserted by path now, which is what LibreOffice actually looks for.

Also depends on fonts-liberation rather than fonts-liberation2. The
latter is a transitional package in Trixie that exists only to depend on
the former, and a release should not name a package whose whole purpose
is to go away.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-22 20:47:57 -05:00
co-authored by Claude Opus 5
parent 9c864a1e44
commit 32ee0b544a
2 changed files with 13 additions and 5 deletions
+12 -4
View File
@@ -274,10 +274,18 @@ text = library.first_text("/tmp/deck/slides.pdf", pages=2)
assert "Session 7" in text, f"text did not survive the conversion: {text!r}"
CONVERT_CHECK
# The fonts a Google Slides export asks for, by their real names.
fc-list 2>/dev/null | grep -qi 'Liberation Sans'
fc-list 2>/dev/null | grep -qi 'Carlito'
fc-list 2>/dev/null | grep -qi 'Caladea'
# The fonts a Google Slides export asks for, as files on disk.
#
# Asserted by path rather than through fc-list: fc-list belongs to the
# fontconfig package, which nothing here pulls in, so the check passed
# vacuously until it didn't and then failed for a reason that had nothing
# to do with the fonts. What LibreOffice actually needs is the file.
[[ -f /usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf ]]
[[ -f /usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf ]]
[[ -f /usr/share/fonts/truetype/liberation/LiberationSansNarrow-Regular.ttf ]]
[[ -f /usr/share/fonts/truetype/crosextra/Carlito-Regular.ttf ]]
[[ -f /usr/share/fonts/truetype/crosextra/Caladea-Regular.ttf ]]
[[ -f /usr/share/fonts/truetype/croscore/Arimo-Regular.ttf ]]
# And the one that must NOT be here, because it prompts for a licence.
! dpkg -l ttf-mscorefonts-installer 2>/dev/null | grep -q '^ii'