kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.67k stars 271 forks source link

UI elements are missing text #393

Closed DemianTinkiel closed 1 year ago

DemianTinkiel commented 1 year ago

Describe the bug All labels, button text and tooltips are missing. This also affects dialogue windows. I reverted back to version 5.4.0 and the issue is not present

To Reproduce Steps to reproduce the behavior:

  1. Open program

Expected behavior To be able to see text

Screenshots Screenshot from 2022-09-30 16-37-42 Screenshot from 2022-09-30 16-28-31

Environment

kaikramer commented 1 year ago

This is quite surprising because release testing for 5.5.1 was done on Fedora 35 with Gnome 41. We will have to find out now what is different on your machine.

What's your DPI setting?

Is there a reason why you are still using Java 8? KSE will soon drop support for Java 8.

Is there anything else that might be unusual about your setup?

DemianTinkiel commented 1 year ago

Sorry for the delay.

xrdb -query |grep dpi

Xft.dpi:    96

Scaling is 100%

I'm still using JSE8 because of company policy regarding Oracle's licencing (don't ask... :stuck_out_tongue_closed_eyes: )

I don't think there is anything else that might be unusual about my setup. At least nothing I can think of, if I find/remember anything else I'll update it here

kaikramer commented 1 year ago

Ok, I see. And I have just realized that it is not only Java 8, but also a very old version of Java 8 (release date of Java 8u202 was January 15, 2019). I am pretty sure that's the reason for the visual problems. Some updated library in KSE probably does not support 8u202 anymore.

There are a lot of alternatives to Oracle's Java now that have no license issues. You can simply install the OpenJDK packages from Fedora for example (my recommendation). Or download Temurin from the Eclipse Adoptium project, Amazon's Corretto or Azul Systems Zulu. All of these are free for commercial and personal use.

SubOptimal commented 1 year ago

@DemianTinkiel The issue is not linked to Oracle Java 1.8.0_202 and KSE 5.5.1. This combination is working well under Debian bookworm. But in a virtual machine with Fedora 35 I could reproduce the issue.

The origin of the problem might be related to

I'll try to have a closer look the next days.

kaikramer commented 1 year ago

@SubOptimal Thanks for taking care of this! However please keep in mind that there is always the possibility to use a specific Java version only for KSE by putting the Java runtime into the KSE directory (renamed to "jre"). Also I don't want to encourage the use of unsupported and outdated Java versions that most probably have security vulnerabilities. So if there is a way to use a current Java version, then this should be the preferred solution. Thanks again!

SubOptimal commented 1 year ago

@kaikramer It's not related to the used Java version.

The commit which breaks it (at least for Fedora 35) is 75bfc547fe. After initial coarse check it seems to be related to the FlatLaF.

btw. What was the reason to remove the ability to use the default PLaF? I've seen in the commit history that there was in the past a check based on the XDG_DEFAULT_DESKTOP (e.g. for GNOME).

SubOptimal commented 1 year ago

@kaikramer Compiling KSE 5.5.1 with FlatLaF >= 1.6.5 solves the issue.

The release note even addresses the issue

missing text if system font is "Cantarell" (on Fedora)

Needs to be decided if the dependency should be changed to version 1.6.5 or even to a more recent version.

@DemianTinkiel Switching the "Interface Text" font to a different font than Cantarell solved the issue as well.

image

kaikramer commented 1 year ago

@SubOptimal Good find! But you can't say that it's not related to the used Java version if there is no issue with OpenJDK.

It's even mentioned in the release notes that only Oracle's Java is affected:

grafik

btw. What was the reason to remove the ability to use the default PLaF? I've seen in the commit history that there was in the > past a check based on the XDG_DEFAULT_DESKTOP (e.g. for GNOME).

There were visual glitches with the GTK LaF (I am not joking). The macOS LaF also had some issues. It's much better with FlatLaf on any platform.

The development version of KSE is already at FlatLaf 2.4, so the next KSE release will include a fixed FlatLaf version in any case.

Thanks again for your help with this ticket. Much appreciated!

SubOptimal commented 1 year ago

@kaikramer

Because of Oracle Java, it works on Debian with that specific Java version and the Cantarell font. So I would say it's not a general Oracle Java problem (did no deeper investigation on that field, maybe it's related to Oracle Java (could not find an OpenJDK 1.8_202) and the way Fedora apply font hints for Canatarell (other fonts on Fedora seems to work)). Fair enough, there is a working solution for Demian, KSE and FlatLaF.

image

Thanks for your comment about removal of XDG_DEFAULT_DESKTOP. I was just curious to know about the reason behind.

Glad that I could help a bit.

edit: As on the screenshot there is the Nimbus PLaF shown, it works on Debian with Oracle 1.8_202 also with the FlatLaF's.