6

I am using Ubuntu 13.04 and coding an application to display some labels ( using the Label class ). I also tried to use Text class and set the smoothing type to LCD. The result is the same, the font looks blurry, its margins are scattered, and you have to set its size to a pretty big number in order to be readable ( note I have some text paragraph displayed ).

I know JavaFX2 has LCD sub-pixel rendering but still, can something be done so that the font doesn't look so ugly? ( maybe I'm missing something for 2.X or don't know of existence of something in 8.X )

Is there any way to check if LCD sub-pixel rendering is active or not?

Regards,

4

2 回答 2

11

利用

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

两者或一次。

于 2014-10-30T20:01:07.540 回答
0

将整个应用程序的字体更改为'Ubuntu Light',给我一个完美的外观。我也尝试过其他一些字体,但它们使外观变差。

第 1 步:在application.css文件中添加以下样式。

.text {
    -fx-font-family: "Ubuntu Light";
}

第 2 步:将样式应用到您的父场景。

scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
于 2015-11-02T13:41:40.140 回答