Skip to content

[ui] Designer font display #10

Closed
@Jmm233

Description

@Jmm233

PMD designer v6.11.0

OS:Ubuntu16.04

2019-02-24 17-35-42

The font in the designer is too difficult to read,so i come for help.
thank you

Activity

oowekyala

oowekyala commented on Feb 24, 2019

@oowekyala
Member

Hi, thanks for the report. This is weird: the designer uses the default fonts provided by the JavaFX distribution. Could you provide the following info to help us work out a solution:

  • How did you start the app? (eg with the launch script (run.sh designer), from inside an ide, with java -jar, with gradle...)
  • What JRE is it running on? Does the problem also arise when you run it with another JRE? The designer supports JRE versions 8, 9 and 10 perfectly (both Oracle and OpenJDK), and JRE 11 if OpenJFX is installed separately somewhere. With JRE 9+ you need the following VM option:https://github.com/pmd/pmd/blob/63c5cce4b7abdcd9b10fa52d851bbe7c0332fef7/pmd-dist/src/main/resources/scripts/run.sh#L118
    which is added automatically by the run script
  • What's your display's resolution?
Jmm233

Jmm233 commented on Feb 26, 2019

@Jmm233
Author

thanks.

  • run.sh designer

  • the jdk version is 1.8.0_191,so i think jre version is 8.According to your instructions, the designer should be no problem.

  • the display's resolution is 1920X1080,which is the computer's max

so if i want to change the designer font display,i could change java version?

adangel

adangel commented on Feb 26, 2019

@adangel
Member

Could this be an font anti aliasing issue?
There is this stack overflow question: https://stackoverflow.com/questions/24254000/how-to-force-anti-aliasing-in-javafx-fonts

Desktop environments also usually offer settings for displaying fonts (hinting, sub-pixel-rendering, anti aliasing). But these settings probably won't effect javafx applications.

Jmm233

Jmm233 commented on Feb 27, 2019

@Jmm233
Author

well,your suggestion is valuable, and i got a lot. i am a rookie,so i haven't solve this.i think it is also ok to read. thank you for your help.

oowekyala

oowekyala commented on Feb 27, 2019

@oowekyala
Member

@adangel Not sure it's an aliasing problem. You could be right, but in the screenshot, the font looks like it has serifs (e.g. the l), even though the designer normally uses a sans serif font family. So it could be that the font is for some reason not found and defaulted to that low-res one? I'm not sure how JavaFX selects fonts though, so whether it's a problem with the system or with the JFX distribution...

@Jmm233 If you've got another JRE installed, I'd try switching just for the sake of it. On ubuntu you may use sudo update-alternatives --config java if you've installed your JREs through a package manager. If you need some more help we can talk on Gitter

transferred this issue frompmd/pmdon Mar 16, 2019
ChitsuthaCSKKU

ChitsuthaCSKKU commented on Dec 9, 2020

@ChitsuthaCSKKU

Screen Shot 2563-12-09 at 14 52 50

I ran the designer from run.sh designer on macOS. Anyone knows how to solve this? Thanks

adangel

adangel commented on Dec 11, 2020

@adangel
Member

@ChitsuthaCSKKU Which java version and openjfx version are you using? Try updating to the latest version, maybe that solves the problem.

ChitsuthaCSKKU

ChitsuthaCSKKU commented on Dec 11, 2020

@ChitsuthaCSKKU

I am using
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment (build 15.0.1+9)
OpenJDK 64-Bit Server VM (build 15.0.1+9, mixed mode, sharing)
javafx-sdk-11.0.2

which are the latest version, I think?

adangel

adangel commented on Dec 11, 2020

@adangel
Member

You could try to use openjfx 15.0.1, maybe there are some bugs fixed. It's available from here https://gluonhq.com/products/javafx/

savithraj

savithraj commented on Jun 3, 2021

@savithraj

I used openjfx version 16 but I am getting below error. If I use version 11 then I am getting the same UI as @ChitsuthaCSKKU

Jun 03, 2021 8:54:29 AM com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @40f9161a' Graphics Device initialization failed for : es2, sw Error initializing QuantumRenderer: no suitable pipeline found java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280) at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244) at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:261) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:831) Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94) at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124) ... 1 more java.lang.RuntimeException: No toolkit found at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:273) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:286) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:160) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658) at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195) at java.base/java.lang.Thread.run(Thread.java:831)

oowekyala

oowekyala commented on Jun 3, 2021

@oowekyala
Member

@savithraj Have you had a look at #49? It looks similar to your error

jsotuyod

jsotuyod commented on Aug 10, 2022

@jsotuyod
Member

I did some research into this, and the original issue seems to be rooted on the overall way the javafx renderer works on Linux, which effectively produces blurry text (ie: look into https://github.com/woky/javafx-hates-linux).

Fortunately, it seems that simply setting:

System.setProperty("prism.text", "t2k");
System.setProperty("prism.lcdtext", "true");

is enough to get much better results. Moreover, this can be done during application startup (in the DesignerStarter) with no further changes needed in the application.

I'm unsure if these flags have any unwanted effect on other platforms (that is, f we should only set this when detecting we run under Linux).

jsotuyod

jsotuyod commented on Aug 11, 2022

@jsotuyod
Member

As for the issue on Mac shown on #10 (comment) I was able to reproduce it using an older version of javafx.

When I run from the IDE (using Javafx 11) the text shows corrupted. Doing some trials I found out that JavaFX 14+ is needed to fix this.

added a commit that references this issue on Aug 11, 2022

4 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      [ui] Designer font display · Issue #10 · pmd/pmd-designer