SNAP on 4K/hiDPI screens

The SNAP GUI does not apply proper scaling of fonts and icons on hi-dpi (4K) screens on Linux platforms. Therefore, the SNAP interface is hardly readable on such displays. As far as I know, this problem does not occur on Windows.

Is it possible to adapt DPI settings and icon size in the SNAP settings somehow? Or is it something in the Java settings? How can I tackle this problem?

Thanks,
Rob

Unfortunately this happens also on Windows. Maybe not as worse as on Unix. It is more a general Java problem. We are suffering from this problem too.
We already set java options which should help in the snap.conf file:

... -J-Dsun.java2d.noddraw=true -J-Dsun.awt.nopixfmt=true -J-Dsun.java2d.dpiaware=false ...

Unfortunately this seems not to be the final solution but we haven’t found a better one yet.

Dear marpet,

Thanks for your findings. The java settings in the snap.conf file were already set the way you showed, apparently this is the default of the SNAP installer.

I have tried modifying these flags (setting true to false and vice-versa) and even removing them, but this did not change the behaviour of SNAP on my linux desktop.

Calling SNAP with e.g. modifier “–fontsize 24” increases fonts in the SNAP interface, which helps me for the time being (only icons are very small).

If I remember correctly the Problem was worse on Linux as on Windows.
Yes, setting the font size helps a bit. Unfortunately there is no better solution.
I’m very sorry for this.

I have the opposite problem on Ubuntu 16.10 Gnome. Font in SNAP is way too large, and appending --fontsize 9 into snap.config makes no difference. Any tip from someone more familiar with NetBean RCP?
Thanks, --Mel.

You can try to switch to a different look&Feel. Try Nimbus or Metal.
You can find the setting in Tools -> Options and there in the tab Appearance

Thanks a lot, effectively the default GTK+ option is unusable on ubuntu gnome 16.04. Changing to any other option makes snap usable on my linux machine.

The installed SNAP uses -Dsun.java2d.dpiaware=false which tells the OS that it is not DPI aware and therefore the OS should apply scaling. However after update the IDE and Java JDK, this seems to get ignored. What worked for me on Windows was changing the DPI compatibility settings on Java.exe and Javaw.exe.

  1. Find java.exe installed.
  2. Right click → Properties
  3. Go to Compatibility tab
  4. Check Override high DPI scaling behavior.
  5. For Scaling performed by: choose System

Is it possible to enlarge the font in the SNAP interface? I am using SNAP 9.0.0.0 on Ubuntu 23.04.
Thanks in advance!

This is off-topic, but nobody should be using SNAP9 without all the module updates after 9.0.0.0.

With the next release of SNAP the display of fonts should be better:
SNAP switches from Java 8 to Java 11 and in Java 9 the font is differently drawn.
JEP 263: HiDPI Graphics on Windows and Linux (openjdk.org)

Right now there is no way to increase the font size.
But you can try different a Look&Feel. They use different font sizes.
Maybe this helps you.
You can change the Look&Feel in the Options.

Nimbus might be worth a try.

2 Likes

Thank you Marco! I was using the Metal look and now is better with Nimbus.

1 Like