From 08284b7d7b5dc8721c424162d4e4a5ba34a7707d Mon Sep 17 00:00:00 2001 From: jessikitty Date: Tue, 13 Oct 2026 11:54:04 +1100 Subject: [PATCH] Install a font in the image python:3.12-slim ships no font files, so Pillow fell back to its 10-pixel bitmap font and every printed label came out with sub-millimetre text. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Vunz4VLxAYDBnU5tLciLDC --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1d9121b..0cfa618 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,11 +13,17 @@ ENV PYTHONUNBUFFERED=1 \ # libpq for psycopg, and the runtime libs PyMuPDF/Pillow need for # PDF thumbnails and image handling. +# +# fonts-dejavu-core is not optional: python:3.12-slim ships no font files, +# and without one Pillow silently falls back to a 10-pixel bitmap font. +# Part labels then print letters under a millimetre tall - legible on +# screen, unreadable on the sticker. RUN apt-get update && apt-get install -y --no-install-recommends \ libpq5 \ libjpeg62-turbo \ zlib1g \ libfreetype6 \ + fonts-dejavu-core \ curl \ && rm -rf /var/lib/apt/lists/*