If your Java service draws text anywhere (a chart in a PDF report, a label on a generated thumbnail, a watermark on an uploaded image), it depends on whatever fonts are installed on the machine it runs on. Most developers never think of fonts as a dependency. Their laptop has a few hundred of them. The production container has a handful, or none, and nobody wrote that down.
I’ve spent a lot of time on Java code that puts text into images and documents, and font problems are some of the most annoying bugs I know of. They rarely crash anything important. They just make output slightly wrong in a way that only shows up on one machine.
The container with no fonts at all
Slim base images leave out fontconfig and freetype because almost nothing on a server needs them. AWT does, even in headless mode. Setting - Djava.awt.headless=true only tells the JVM there’s no display.…