Why does `temurin-17-jdk` depend upon `dejavu-sans-fonts`?

 L    316.7M temurin-17-jdk            17.0.19.0.0.10-0.x86_64                                                                                                                                                                                                                                                              
        5.5M └─> dejavu-sans-fonts         2.37-29.fc44.noarch

I don’t understand why a Java runtime would want a typeface installed.

From what I understand it’s because the JDK expects at least one usable system font for Java2D/AWT/Swing and rendering text (including printing/headless image/PDF generation). Fed’s Temurin package (the full headful JDK) pulls in DejaVu Sans as the distro’s safe default physical font for Java’s logical SansSerif mapping. If no suitable sys-fonts are present, text rendering either looks wrong (bitmap fallback) or fails for certain glyphs/locales, etc.

Package maintainers therefore ensure a reasonable font is available by depending on a well covered unicode font and DejaVu is a common choice, adding a dependency on a font package so that the regular JDK behaves correctly with out-of-box desktop/server installs.

If you don’t want/need any text rendering, just install the headless alternative (omits GUI/graphics/font dependencies).

@chronobellator, thanks. A shame that no equivalent exists for the JDK; I solely need it for React development, [1] which I doubt requires rendering typefaces.


  1. github.com/Patroniks-App/patroniks/pull/162#issue-4480906401 ↩︎