Text rendering on Windows
felipe.heidrich at oracle.com
Mon Aug 18 19:00:56 UTC 2014
There are many different ways to configure DirectWrite, but without more details I can not tell what that is for your case.
Maybe the first thing to try is to go to DWGlyph#createAnalysis() and changed the rendering mode from DWRITE_RENDERING_MODE_NATURAL to DWRITE_RENDERING_MODE_GDI_CLASSIC or DWRITE_RENDERING_MODE_GDI_NATURAL. That said, there are many other knobs to try and combine.
You can also file a jira with images of your javaFX application and a native app using the very same font and size, same foreground, and same background. That should enable me to try it on my machine too.
In case you are coming to JavaOne this year, you could bring your laptop and application, I have a BOF on text rendering scheduled. We could hack some code together and maybe find a solution.
LCD text rendering on Canvas is assigned to Jim, see https://javafx-jira.kenai.com/browse/RT-23822
The fix version recored on jira is 9, it would be nice if we could get it before that but I don’t know if it is possible, Jim ?
> On Aug 18, 2014, at 1:28 AM, John C. Turnbull <ozemale at ozemail.com.au> wrote:
> Hi Felipe,
> I just finished watching your excellent presentation at SVJUGFX on text rendering with JavaFX and have a couple of multi part questions:
> 1) I noted that DirectWrite is now used to rasterise fonts on Windows instead of T2K or GDI and I for one am pleased about this. However, no matter what I do I just can't get JavaFX text to be rendered as crisply or as "black" as I see in native Windows apps that also use DirectWrite. The result is that my app undesirably "stands out" from a native app.
> What could be the cause of this? I saw that DirectWrite provides several options for rendering text and that currently only the default one is being applied so could it have something to do with this?
> Is work being done to reduce the differential between JavaFX text rendering quality and that of native Windows apps?
> 2) I appreciated the explanation relating to LCD text in Canvas and the issue with the Canvas initially bring a transparent surface making later blending with an actual background problematic leading to greyscale support only.
> Given that many of us see this as a very serious impediment to developing complex controls that use Canvas, is there a focus within the JFX team on finding a way of supporting LCD text in Canvas and if so, which JFX version is likely to first include this support?
> Thanks again for a great talk and for all the hard work you have put into improving text rendering in JavaFX :-)
More information about the openjfx-dev