Smart Card Shell scaling problem with high resolution

Hi there,
using Smart Card Shell (SCS) 3.18.39 with a ThinkPad P15v Gen3 with a 15,6" Display and a 3840 x 2160 resolution and a scaling of 250% on Microsoft Windows 23H2 [Version 10.0.22631.4460]


image
image

Is there an option to set a property to conquer the high scaling?

related
Windows scaling problem with Nitrokey App - Nitrokeys - Nitrokey Support
Windows 10 scaling problem with Nitrokey App and high resolution screens · Issue #273 · Nitrokey/nitrokey-app · GitHub

If not and if there is a use base for use this might be a feature request with priority low :wink:

Thanks and best regards,
Tobias

That is a known issue of Java Swing applications and unfortunately there is no good solution for it.

What helped a bit to ease the problem is to add

-Dsun.java2d.uiScale=2

in scsh3gui.cmd or the scsh3gui shell script.

Thanks, added this to the scsh3gui.cmd %JAVAW% -Xmx1024m -Dsun.security.smartcardio.t1GetResponse=false -Dorg.bouncycastle.asn1.allow_unsafe_integer=true -Djava.library.path=./lib de.cardcontact.scdp.scsh3.GUIShell -Dsun.java2d.uiScale=2
but I don’t see any difference.

Thanks for the link.
This was the solution

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

using

java -version
openjdk version “21” 2023-09-19 LTS
OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS)
OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)

in Path this is added C:\Program Files\Java\Temurin\JDK-21\bin
changed the property of javaw.exe

in german:

  1. right click: Eigenschaften
  2. Reiter Kompatiblität
  3. Abschnitt Einstellungen, click Hohe DPI-Einstellungen ändern
  4. Abschnitt Außerkraftsetzung der hohen DPI-Skalierung, check the checkbox: Verhalten bei hoher DPI-Skalierung überschreiben. Skalierung durchgeführt von:, select from dropdownlist System
  5. OK, OK

Don’t know if this will survive an update but I do know how to fix this.
This is also working now for Greenshot :wink:

Thanks and have a nice week.