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

Text artifacts question #145

Closed
laseray opened this issue May 12, 2015 · 20 comments
Closed

Text artifacts question #145

laseray opened this issue May 12, 2015 · 20 comments

Comments

@laseray
Copy link

laseray commented May 12, 2015

Hi Tomas,

You must have noticed that text nodes display text with some color distortion artifacts, particularly on text with vertical segments (e.g. the letter 'l' or 'T'). These are clearly visible in the screenshots of the RichTextFX page, the demos, and other unrelated JavaFX applications.

Do you have any idea of their cause and if a bug report has been filed with the JDK/OpenJDK teams?

I took some time to try to look to see if one had been filed, and if anyone else had noticed this problem, but I did not find much related to it. In my opinion, this has some relation to the previously reported bug of display artifacts in selected text for RichText. Something to do with misaligned color masks. I want to pursue this further, any insight you have on the matter is appreciated.

Thanks.

@ghost
Copy link

ghost commented May 12, 2015

What is the Java version you're working with? It works fine here with u45

On Tue, May 12, 2015 at 7:25 AM, laseray notifications@github.com wrote:

Hi Tomas,

You must have noticed that text nodes display text with some color
distortion artifacts, particularly on text with vertical segments (e.g. the
letter 'l' or 'T'). These are clearly visible in the screenshots of the
RichTextFX page, the demos, and other unrelated JavaFX applications.

Do you have any idea of their cause and if a bug report has been filed
with the JDK/OpenJDK teams?

I took some time to try to look to see if one had been filed, and if
anyone else had noticed this problem, but I did not find much related to
it. In my opinion, this has some relation to the previously reported bug of
display artifacts in selected text for RichText. Something to do with
misaligned color masks. I want to pursue this further, any insight you have
on the matter is appreciated.

Thanks.


Reply to this email directly or view it on GitHub
#145.

@laseray
Copy link
Author

laseray commented May 12, 2015

The same, build 1.8.0_45-b14. Are you saying that you do not see those artifacts in the screenshots of the project or?

@ghost
Copy link

ghost commented May 12, 2015

Ah, I see now. In the screenshots (the code area example), I looks like the
code area shown in the screenshot assigns teal and brick-like colors to the
brackets, braces, and parentheses. Yes, I do notice some sort of color
bleeding on these characters.

That said, I used code area in a prototype and just checked. Things seem to
render OK.

On Tue, May 12, 2015 at 7:41 AM, laseray notifications@github.com wrote:

The same, build 1.8.0_45-b14. Are you saying that you do not see those
artifacts in the screenshots of the project or?


Reply to this email directly or view it on GitHub
#145 (comment)
.

@laseray
Copy link
Author

laseray commented May 12, 2015

Hmm, I will try that out, make some more checks. I definitely see this effect in the RichText demo. I have also seen it in a web browser app made with the JavaFX webView component, willow browser(http://code.google.com/p/willow-browser/), in the web pages, the button, etc.

@ghost
Copy link

ghost commented May 12, 2015

Would it be an artifact due to the font type? because I think I changed the
font.
I don't have the setup now to rebuild the code (just reformatted my
machine), but could it be related to font families?

On Tue, May 12, 2015 at 8:11 AM, laseray notifications@github.com wrote:

Hmm, I will try that out, make some more checks. I definitely see this
effect in the RichText demo. I have also seen it in a web browser app made
with the JavaFX webView component, willow browser(
http://code.google.com/p/willow-browser/), in the web pages, the button,
etc.


Reply to this email directly or view it on GitHub
#145 (comment)
.

@laseray
Copy link
Author

laseray commented May 12, 2015

No, I tried a few different ones in RichText demo. I had someone else look and they could see it, tried a few different monitors. You can even see it in the Windows screenshots sent for the text selection bug that you opened, in the unselected text. It is a little less visible, but still there (Text-Rendering Issue in v5 #88).

@TomasMikula
Copy link
Member

Hi. I noticed that, but haven't done any research into that. I don't want to get into low-level text rendering stuff. I just assumed that it is something that would go away as JavaFX matures, without my involvement. I'm not even sure that it is related to #88, because both problems have co-existed before, while one of them went away with JDK 8u40 and RichTextFX 0.6, while the other remained.

Screenshots on the project page were done on Linux with some pre-8u40 version. I just ran the demos on Mac with 8u40 and the rendering seems somewhat better, but it is still there. It's best visible with white text on black background.

I have to disappoint you that I don't have any further insight on the issue.

This is a minimal example reproducing the issue:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class TextColorDistortion extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) {
        Label label = new Label("||||||||||||||||||||||||||||||||||||||||");
        label.setStyle(
                "-fx-background-color: black;" +
                "-fx-text-fill: white;");

        stage.setScene(new Scene(label, 200, 100));
        stage.show();
    }
}

And this is the result:
text-color-distortion

Let me know if you file an issue.

@laseray
Copy link
Author

laseray commented May 12, 2015

A bug report has been filed (Review ID: JI-9021181). Thanks for the code sample, Tomas. I used it in the bug report.

@TomasMikula
Copy link
Member

Thanks! Can you please post the link here for reference?

@laseray
Copy link
Author

laseray commented May 12, 2015

I will once it is reviewed and a new Bug ID is assigned. Didn't receive anything to link to yet.

@TomasMikula
Copy link
Member

Oh, as far as I know, JavaFX bugs are still filed through https://javafx-jira.kenai.com/ (although merge with JDK bug tracker should happen some time soon).

@laseray
Copy link
Author

laseray commented May 12, 2015

I had to file through bugs.java.com because JBS, which it has moved to now, does not allow non-authors to file bugs. You must have at least one project within OpenJFX/JDK to create bug reports. Just a regular programmer, so out of luck.

@TomasMikula
Copy link
Member

The JavaFX Jira I linked above allows any registered user to file an issue.

@laseray
Copy link
Author

laseray commented May 12, 2015

I basically see nothing there, no bugs visible for reading. And no way to register for an account.

@TomasMikula
Copy link
Member

Hmm, then they probably disabled new account creations, since they will be moving to JBS soon.

@laseray
Copy link
Author

laseray commented May 12, 2015

Okay, I did have an account there that I forgot about from more than a year ago, but the login gave no indication of how to register, which would have caught me trying to register again (probably disabled as you mentioned). My mistake. I don't think making a duplicate filing will be appreciated. Will just have to wait for it to trickle down. I'll check periodically and if it doesn't turn up, or I do not get a Bug ID assigned, then I will try again.

@laseray
Copy link
Author

laseray commented May 13, 2015

Okay, I found some previously reported/related bugs. See https://javafx-jira.kenai.com/browse/RT-36678 and https://javafx-jira.kenai.com/browse/RT-15188.

It is some kind of rendering pipe problem in the switchover from the previous t2k to native in more recent jdk versions. It can be worked around (on my machine) by launching with either of the following:
java -Dprism.text=t2k ...
java -Dprism.lcdtext=false ...

@TomasMikula
Copy link
Member

Thanks for digging into this. I'm not sure either one is exactly the same issue as this. The problem does go away with the VM arguments you posted.

@TomasMikula
Copy link
Member

I opened RT-40774.

@laseray
Copy link
Author

laseray commented May 14, 2015

Noted, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants