Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from GDK_SCALE to J2D_UISCALE in netbeans launcher script for linux #8243

Open
sijskes opened this issue Feb 13, 2025 · 2 comments
Open
Labels
kind:feature A feature request needs:triage Requires attention from one of the committers os:linux UI User Interface

Comments

@sijskes
Copy link
Contributor

sijskes commented Feb 13, 2025

Description

Re: #7780

Conditions:
HiDPI, Linux, X11

When a program is developed in NB, that invokes a X program, the invoked program will inherit the GDK_SCALE environment variable, set by the netbeans launcher script. The effect will be 4x scaling in the invoked program.

Consider using J2D_UISCALE as a replacement for GDK_SCALE in the launcher script.

See also #7780 for a part of the discussion.

Use case/motivation

To improve the fontscaling workaround used in launcher script.

Related issues

#7780 #6185

Are you willing to submit a pull request?

Yes

@sijskes sijskes added kind:feature A feature request needs:triage Requires attention from one of the committers labels Feb 13, 2025
@mbien mbien added UI User Interface os:linux labels Feb 13, 2025
@sijskes
Copy link
Contributor Author

sijskes commented Feb 13, 2025

It is clear, the GDK_SCALE setting is interpreted differently by the JDK vs the X programs. Unclear is, since when, and until. OpenJDK21 running on stock Ubuntu-mate 24.04 with HiDPI, will not scale the fonts correctly (and 22.02 also didnt without tweaking).

Ideally the JDK needs to use the same algorithm as the other X11 programs. I'm not sure if behavior of X11 programs has changed recently, my most recent scaling problems occured when upgrading from Ubuntu 22.04 to 24.04, and starting over with a fresh environment/profile.

@sijskes
Copy link
Contributor Author

sijskes commented Feb 13, 2025

Taking #7780 (comment) in consideration, the launcher should not touch the environment if one or both of the GDK_SCALE and J2D_UISCALE is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature A feature request needs:triage Requires attention from one of the committers os:linux UI User Interface
Projects
None yet
Development

No branches or pull requests

2 participants