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

Font display issues on Linux #398

Closed
RyanTheAllmighty opened this issue Jul 23, 2020 · 5 comments
Closed

Font display issues on Linux #398

RyanTheAllmighty opened this issue Jul 23, 2020 · 5 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@RyanTheAllmighty
Copy link
Member

RyanTheAllmighty commented Jul 23, 2020

As mentioned by @jamierocks in #396 and on Discord previously, new theme font rendering looks jank AF on Linux:

image

After some research it looks like Linux java not using anti aliasing by default. Once you launch with certain command line arguments (listed at https://cvigano.de/blog/2018/07/15/font-antialiasing-in-java-on-linux/) it will show correctly (my Manjaro setup below showed dodgy until I added those command line arguments):

image

Now with those arguments it looks perfectly fine on Linux.

Issue doesn't seem to be a problem on Windows or even OSX, only on Linux.

For the moment I'm disabling the custom fonts on Linux only until this can hopefully be applied programatically in the apps startup code.

@RyanTheAllmighty RyanTheAllmighty added the bug Confirmed bugs or reports that are very likely to be bugs. label Jul 23, 2020
@RyanTheAllmighty
Copy link
Member Author

RyanTheAllmighty commented Jul 23, 2020

Looks like you can do it programatically. I've done that and it looks the exact same with no change

        // enable anti-aliased text
        System.setProperty("awt.useSystemAAFontSettings", "on");
        System.setProperty("swing.aatext", "true");

@RyanTheAllmighty
Copy link
Member Author

So options likely will be:

  • Force all linux users to launch with -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true arguments to get correct fonts
  • Switch back to a default sansserif font only if the user is on Linux

Both options are shit, and not ideal.

@RyanTheAllmighty
Copy link
Member Author

Same issue seems to happen on current launcher on my Manjaro system.

image

So given that, going to move forward with fonts the same across all systems, and all Linux users will need to apply the flags themselves

@RyanTheAllmighty
Copy link
Member Author

Ubuntu without any command line params is fine in both the latest build and the release build, so must be specific to OS/java version.

Going to close this

@RyanTheAllmighty
Copy link
Member Author

Going to add in an option in the settings to the launcher to use base font so users can disable custom fonts if they have issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Development

No branches or pull requests

1 participant