I’m having trouble with a JAR application. All the UI fonts are italic.

Ideally I’d like the UI to use default system UI fonts, alternatively I’d like to set the UI font manually.
I can send some environment variables to the launchers but I’ve no idea what those might be.
Is there any way to globally set default fonts for Java use?
I’m using a special JDK because I need a component only this one bundles (JavaFX), however I must have done something to screw the fonts because they worked properly at some point, even with this version of java. Maybe before some updates? Although it might not make sense, I was editing the Fonts in QT6 Settings before this happened.
Here’s my java versions list:
$ archlinux-java status
Available Java environments:
java-18-openjdk
liberica-jdk-11-full (default)
Thanks for the reply. I’ve stumbled upon these but they yielded no results.
I suspect it’s somehow related to qt6 settings (although I can’t fathom the link between java and qt6). As I’ve been fiddling with them before this happened.
I’m on XFCE, btw.
UPDATE:
So I’ve created a symlink like this sudo ln -s /usr/share/fonts/TTF /usr/lib/jvm/liberica-jdk-11-full/lib/fonts/fallback
and this kinda, sort-of fixed the issue. I still have no control over the default font, but at least the font in the Java applet is no longer italic. It is now bold. I can live with bold however.

I’ve identified the font as being Inconsolata Bold (if i delete Inconsolata Bold from the fallback directory, the font reverts to the italic default). Seems like a random choice to me, especially since it’s a monospace font, but the UI is not supposed to use monospace font.
1 Like
Not exactly random. It has a pattern (as explained in the linked Archwiki article). A glyph (U code or similar) is searched, not a font. Some rare (localized?) glyphs are not included in all fonts, so they search each next font in sequence to find that glyph. They use the 1st font that includes it. (as I understand the explanation and by experience…)