Overly large menu fonts with java 10 in Ubuntu
I’m running Ubuntu 16.04. In 18.04, the default java install will become Java 10, so for an upgrade project I installed it on my machine. Since I read Netbeans 8.2 isn’t compatible with Java 10, I upgraded it as well to Netbeans 9.0
Unfortunately, in Netbeans 9.0, the font used by the GUI (such as for the Menu bar) was HUGE, actually too large to be usable in practice.
Having spent considerable time looking on forums, trying a lot of additions to my netbeans.conf file, none was of any help unfortunately.
Then, I stumbled accross this bug: Java windows and fonts are huge running in openjdk-11-jre, which eventually allowed me to solve the issue.
On my machine, executing the command dconf read /com/ubuntu/user-interface/scale-factor yielded:
{'eDP-1': 16, 'DP-1': 8}
That 16 scale factor is actually the source of these huge fonts. To change it, do the following:
1. First, export your dconf settings into an editable format
dconf dump / > dconf-settings.ini
2. Now edit the exported dconf-settings.ini with your favorite editor. Specifically, find this line and change it into:
scale-factor={'eDP-1': 8, 'DP-1': 8}
3. Last thing to do, is to re-import this modified settings again:
dconf load / < dconf-settings.ini
It did cost me some time, so I wanted to share this solution to help out someone else...