Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-3974

HiDPI support in Windows



    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s:
    • Fix Version/s: None
    • Component/s: gui, launcher
    • Labels:
    • Environment:
      Windows 10, Windows 11, HiDPI display


      In a HiDPI environment in Windows, a platform level scaling factor is usually applied (and is often non-integer, e.g. 125%).
      Java 8 and 11 seem to pick up on this scaling factor and will scale _some_ text but not others, depending on what kind of component they are rendered in.
      Screenshots from examples and user reported problems attached.
      This is very similar to the HiDPI problems encountered in Linux and the GtkLookAndFeel (JAL-3552).
      For the issue to be resolved in Linux, we require Java 11, and to set the sun.java2d.uiScale system property _before_ launch of the Jalview desktop. This means being set by -Dsun.java2d.uiScale=N in either getdown or jalview.bin.Launcher (or a cli invocation). The calculation of whether to set this and what to is performed by jalview.bin.HiDPISetting but only if the OS is Linux.
      1) We could see if extending this Jalview-internal-automatic-setting to Windows works (this will hopefully override the OS non-integer setting to give consistent font sizes in Jalview.
      2) This setting has no affect in Java 8 in Linux, but it's not clear to me if it might in Java 8 in Windows since HiDPI support was present for Windows in earlier versions of Java (and the screenshots show that some of the text scaling is happening in Java 8 versions).

      The property can currently be set with jalview.bin.Launcher by setting


          Issue Links



              jprocter James Procter
              soares Ben Soares
              0 Vote for this issue
              2 Start watching this issue