RE: Poor quality font rendering

2013-08-29 Thread Robert Fisher
Ok so apparently I can't send .bmp attachments to this list. Here's an imgur 
link:

http://imgur.com/d5AiHFk

It looks identical to the .bmp, as far as I can tell.

Cheers,
Rob


-Ursprüngliche Nachricht-
Von: openjfx-dev-boun...@openjdk.java.net 
[mailto:openjfx-dev-boun...@openjdk.java.net] Im Auftrag von Robert Fisher
Gesendet: Donnerstag, 29. August 2013 09:07
An: openjfx-dev@openjdk.java.net
Betreff: RE: Poor quality font rendering

Hi all,

I've done a few tests to compare font rendering between JavaFX and something 
native on my 64bit Windows 7 machine. I used Firefox to test native font 
rendering, and JavaFX 8 b100 (my apologies if something's been fixed since 
then), using the code Phil just posted to create a Label, explicitly specifying 
black text  a white background. The font is the default one: Segoe UI, size 12.

I've attached a screenshot of the word 'Entry' blown up 400%, with the native 
text on the left. They are similar but the native text is slightly darker. This 
is actually quite significant - when viewed at 100% the native text looks 
clearer and more vibrant. 

The right side of the 'r' is also cut off in the JavaFX case. Is this related 
to https://javafx-jira.kenai.com/browse/RT-14187 ? And is there anything I can 
do to increase the 'blackness' of my JavaFX text and make it more like the 
native text?

Thanks for the help.

Rob








RE: Poor quality font rendering

2013-08-29 Thread Robert Fisher
Hi all,

I've done a few tests to compare font rendering between JavaFX and something 
native on my 64bit Windows 7 machine. I used Firefox to test native font 
rendering, and JavaFX 8 b100 (my apologies if something's been fixed since 
then), using the code Phil just posted to create a Label, explicitly specifying 
black text  a white background. The font is the default one: Segoe UI, size 12.

I've attached a screenshot of the word 'Entry' blown up 400%, with the native 
text on the left. They are similar but the native text is slightly darker. This 
is actually quite significant - when viewed at 100% the native text looks 
clearer and more vibrant. 

The right side of the 'r' is also cut off in the JavaFX case. Is this related 
to https://javafx-jira.kenai.com/browse/RT-14187 ? And is there anything I can 
do to increase the 'blackness' of my JavaFX text and make it more like the 
native text?

Thanks for the help.

Rob







Re: Poor quality font rendering

2013-08-29 Thread Felipe Heidrich
Hi Robert,

Please add this information to https://javafx-jira.kenai.com/browse/RT-14187
See my previous message, it is possible the difference is due to the shader we 
use to produce subpixel glyphs.

I would have used IE as a representative of a native Windows Microsoft app, but 
I get the point.

Thanks
Felipe


On Aug 29, 2013, at 12:07 AM, Robert Fisher wrote:

 Hi all,
 
 I've done a few tests to compare font rendering between JavaFX and something 
 native on my 64bit Windows 7 machine. I used Firefox to test native font 
 rendering, and JavaFX 8 b100 (my apologies if something's been fixed since 
 then), using the code Phil just posted to create a Label, explicitly 
 specifying black text  a white background. The font is the default one: 
 Segoe UI, size 12.
 
 I've attached a screenshot of the word 'Entry' blown up 400%, with the native 
 text on the left. They are similar but the native text is slightly darker. 
 This is actually quite significant - when viewed at 100% the native text 
 looks clearer and more vibrant. 
 
 The right side of the 'r' is also cut off in the JavaFX case. Is this related 
 to https://javafx-jira.kenai.com/browse/RT-14187 ? And is there anything I 
 can do to increase the 'blackness' of my JavaFX text and make it more like 
 the native text?
 
 Thanks for the help.
 
 Rob
 
 
 
 
 



Re: Poor quality font rendering

2013-08-29 Thread Felipe Heidrich

I need to know what is been tested (the code snippet that created the JFX 
sample) and native app that produced the other sample.

I think what is going on there is that in JFX we are producing our own subpixel 
glyphs in the shader (instead using DW to produce subpixel glyph images).
Note the current JDK approach as an a big advantage that we only need to store 
a single glyph image in the glyph cache's texture.
Using DW to produces subpixel images we will use 3 or 4 times more texture 
space.

Please, add the screenshot information to 
https://javafx-jira.kenai.com/browse/RT-14187 so I can look at it.

Thank you
Felipe



On Aug 29, 2013, at 12:27 AM, John C. Turnbull wrote:

 These observations are consistent with what I have been experiencing and
 trying to describe.
 
 There is still quite a difference between native text and JavaFX text with
 native text certainly looking better.
 
 Is there any hope that this will improve?  It may sound petty/minor but to
 me this is critical to fix.
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Robert Fisher
 Sent: Thursday, 29 August 2013 17:21
 To: openjfx-dev@openjdk.java.net
 Subject: RE: Poor quality font rendering
 
 Ok so apparently I can't send .bmp attachments to this list. Here's an imgur
 link:
 
 http://imgur.com/d5AiHFk
 
 It looks identical to the .bmp, as far as I can tell.
 
 Cheers,
 Rob
 
 
 -Ursprüngliche Nachricht-
 Von: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] Im Auftrag von Robert Fisher
 Gesendet: Donnerstag, 29. August 2013 09:07
 An: openjfx-dev@openjdk.java.net
 Betreff: RE: Poor quality font rendering
 
 Hi all,
 
 I've done a few tests to compare font rendering between JavaFX and something
 native on my 64bit Windows 7 machine. I used Firefox to test native font
 rendering, and JavaFX 8 b100 (my apologies if something's been fixed since
 then), using the code Phil just posted to create a Label, explicitly
 specifying black text  a white background. The font is the default one:
 Segoe UI, size 12.
 
 I've attached a screenshot of the word 'Entry' blown up 400%, with the
 native text on the left. They are similar but the native text is slightly
 darker. This is actually quite significant - when viewed at 100% the native
 text looks clearer and more vibrant. 
 
 The right side of the 'r' is also cut off in the JavaFX case. Is this
 related to https://javafx-jira.kenai.com/browse/RT-14187 ? And is there
 anything I can do to increase the 'blackness' of my JavaFX text and make it
 more like the native text?
 
 Thanks for the help.
 
 Rob
 
 
 
 
 
 



RE: Poor quality font rendering

2013-08-29 Thread Robert Fisher
Hi Felipe,
 
thanks for the response. I added a comment to the JIRA issue. I don't have IE 
installed on my system, but I just made a similar comparison with text in 
Outlook, and it was indistinguishable from the text in Firefox.
 
Cheers,
Rob
 
 
Von: Felipe Heidrich [mailto:felipe.heidr...@oracle.com] 
Gesendet: Donnerstag, 29. August 2013 17:42
An: Robert Fisher
Cc: openjfx-dev@openjdk.java.net
Betreff: Re: Poor quality font rendering
 
Hi Robert,
 
Please add this information to https://javafx-jira.kenai.com/browse/RT-14187
See my previous message, it is possible the difference is due to the shader we 
use to produce subpixel glyphs.
 
I would have used IE as a representative of a native Windows Microsoft app, but 
I get the point.
 
Thanks
Felipe
 
 
On Aug 29, 2013, at 12:07 AM, Robert Fisher wrote:


Hi all,

I've done a few tests to compare font rendering between JavaFX and something 
native on my 64bit Windows 7 machine. I used Firefox to test native font 
rendering, and JavaFX 8 b100 (my apologies if something's been fixed since 
then), using the code Phil just posted to create a Label, explicitly specifying 
black text  a white background. The font is the default one: Segoe UI, size 12.

I've attached a screenshot of the word 'Entry' blown up 400%, with the native 
text on the left. They are similar but the native text is slightly darker. This 
is actually quite significant - when viewed at 100% the native text looks 
clearer and more vibrant. 

The right side of the 'r' is also cut off in the JavaFX case. Is this related 
to https://javafx-jira.kenai.com/browse/RT-14187 ? And is there anything I can 
do to increase the 'blackness' of my JavaFX text and make it more like the 
native text?

Thanks for the help.

Rob


RE: Poor quality font rendering

2013-08-28 Thread John C. Turnbull
Hi Felipe,

Thanks for the info.

Is kerning planned for a Java 8 update or will it have to wait for 9?  Or
10?

One more thing I have just noticed is that the way the text is rendered in a
Text object with LCD font smoothing is quite different from a Label (with
the Text object looking better and closer to native text).

While I concede that the better font rendering I thought I observed in
WebView is probably an illusion, there is definitely a difference between
Text and Label (at least on this machine).

Why would that be?  Are they rendered differently?

Thanks,

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Felipe Heidrich
Sent: Wednesday, 28 August 2013 01:30
To: openjfx-dev@openjdk.java.net List
Subject: Re: Poor quality font rendering


Hi John,

 1. Sub-pixel positioning ( 
 https://javafx-jira.kenai.com/browse/RT-14187 )

Yes, if all goes well RT-14187 will get fixed for FX8.

Notes:
-On Mac we already have sub-pixel positioned glyphs.
-LCD text we also have sub-pixel positioned glyphs.
-The main one that I feel we are missing is grayscale text for Windows.
-It is very unlikely we will have time to do anything for Linux this time
around.


2. Kerning ( https://javafx-jira.kenai.com/browse/RT-7472 )

Not target for 8.

3. Is it just my imagination.

Webview node and text node both use the very same drawing code in Prism.
I would not expect to see any difference...

I hope this helps,
Felipe


On Aug 27, 2013, at 3:42 AM, John C. Turnbull wrote:

 I am still hoping someone can answer my questions on this topic 
 (included here for convenience):
 
 1. When will both (1) and (2) make it into a JDK8 development build?
 2. Are there any other plans/techniques to improve font rendering on 
 the
 horizon for JFX8 or later?
 
 But I noticed something further which I think is a little curious...
 
 It may just be an optical illusion but it definitely appears to me 
 that font rendering within WebView is of a considerably better quality 
 than that in other controls (such as Label, Text) in the sense that it 
 appears crisper and much closer to the native font rendering of the
Windows OS.
 
 So I would like to add another question:
 
 3. Is this just my imagination?
 
 I realise that it's WebKit that contains the rendering code but I 
 would have thought that the exact same Prism calls would be made from 
 within this renderer as would be used by other controls so I don't see 
 why there would be any difference.
 
 Thanks,
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John C. 
 Turnbull
 Sent: Friday, 23 August 2013 17:23
 To: 'Phil Race'; 'John Hendrikx'; 'Felipe Heidrich'
 Cc: openjfx-dev@openjdk.java.net
 Subject: RE: Poor quality font rendering
 
 OK, thanks to everyone who has contributed input to this thread - it's 
 been most enlightening.
 
 So, in summary, it seems that the dark art of font rendering is 
 complex and made more so by having to support numerous different 
 operating systems, font engines, GPUs and monitors etc.
 
 I am sure JavaFX does a pretty good job already under most 
 circumstances but I (personally) hope things improve further in the 
 future and that the gap between JavaFX font rendering quality and that 
 of native font rendering is narrowed.
 
 To this end, there seem to be two main improvements already under 
 development namely:
 
 1. Sub-pixel positioning ( 
 https://javafx-jira.kenai.com/browse/RT-14187 ) 2. Kerning ( 
 https://javafx-jira.kenai.com/browse/RT-7472 )
 
 To assist me in my decision making and planning, would it be possible 
 for someone to answer:
 
 1. When will both (1) and (2) make it into a JDK8 development build?
 2. Are there any other plans/techniques to improve font rendering on 
 the horizon for JFX8 or later?
 
 As I said, my focus is Windows 7 and Windows 8 at the moment so even 
 if you can only answer within these contexts it would be much appreciated!
 
 Thanks,
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Phil Race
 Sent: Friday, 23 August 2013 06:57
 To: John Hendrikx
 Cc: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 On 8/22/2013 1:23 PM, John Hendrikx wrote:
 Oh.. I forgot to say this, but...
 
 Screenshots taken with LCD smoothing on are always gonna end up 
 looking different on different monitors... if for example your 
 monitor has slightly different spacing or a different order of the 
 subpixels (or you rotated it), then the screenshot will look wierd.  
 I prefer to keep LCD smoothing off as I make screenshots / videos 
 regularly and I donot know on what system they'll be viewed on.  So 
 if one of shots has particularly bad colored fringes, it is likely 
 you have a monitor that has a different configuration than mine

Re: Poor quality font rendering

2013-08-28 Thread Scott Palmer
The Grey vs LCD would explain it.  I haven't ever tried to alter the
defaults.


On Wed, Aug 28, 2013 at 11:27 AM, Danno Ferrin danno.fer...@shemnon.comwrote:

 Are you seeing the different defaults for LCD smoothing?  The Text default
 is Grey and the Control default (which Label inherits) is LCD.


 On Wed, Aug 28, 2013 at 5:23 AM, Scott Palmer swpal...@gmail.com wrote:

 From what I have observed, Text and Label appear to have different
 defaults for when antialiasing is applied.  Text will do it always, Label
 only when the font is greater than a certain size.

 Scott

 On 2013-08-28, at 5:26 AM, John C. Turnbull ozem...@ozemail.com.au
 wrote:

  Hi Felipe,
 
  Thanks for the info.
 
  Is kerning planned for a Java 8 update or will it have to wait for 9?
  Or
  10?
 
  One more thing I have just noticed is that the way the text is rendered
 in a
  Text object with LCD font smoothing is quite different from a Label
 (with
  the Text object looking better and closer to native text).
 
  While I concede that the better font rendering I thought I observed in
  WebView is probably an illusion, there is definitely a difference
 between
  Text and Label (at least on this machine).
 
  Why would that be?  Are they rendered differently?
 
  Thanks,
 
  -jct





RE: Poor quality font rendering

2013-08-28 Thread John C. Turnbull
Hi Danno,

 

I am comparing Text with LCD smoothing and Label (untouched) so shouldn't
they both be using LCD smoothing and look the same?  They actually look
quite different.

 

-jct

 

From: Danno Ferrin [mailto:danno.fer...@shemnon.com] 
Sent: Thursday, 29 August 2013 01:28
To: Scott Palmer
Cc: John C. Turnbull; openjfx-dev@openjdk.java.net Mailing
Subject: Re: Poor quality font rendering

 

Are you seeing the different defaults for LCD smoothing?  The Text default
is Grey and the Control default (which Label inherits) is LCD.

 

On Wed, Aug 28, 2013 at 5:23 AM, Scott Palmer swpal...@gmail.com
mailto:swpal...@gmail.com  wrote:

From what I have observed, Text and Label appear to have different defaults
for when antialiasing is applied.  Text will do it always, Label only when
the font is greater than a certain size.

Scott


On 2013-08-28, at 5:26 AM, John C. Turnbull ozem...@ozemail.com.au
mailto:ozem...@ozemail.com.au  wrote:

 Hi Felipe,

 Thanks for the info.

 Is kerning planned for a Java 8 update or will it have to wait for 9?  Or
 10?

 One more thing I have just noticed is that the way the text is rendered in
a
 Text object with LCD font smoothing is quite different from a Label (with
 the Text object looking better and closer to native text).

 While I concede that the better font rendering I thought I observed in
 WebView is probably an illusion, there is definitely a difference between
 Text and Label (at least on this machine).

 Why would that be?  Are they rendered differently?

 Thanks,

 -jct

 



Re: Poor quality font rendering

2013-08-28 Thread John Hendrikx
, 
but I assume it asks Windows for this information.

--John



Regards,
Felipe



On Aug 22, 2013, at 7:05 AM, John Hendrikx wrote:


Those are all normal controls, the plot section is just a Label for example.

On 22/08/2013 13:39, John C. Turnbull wrote:

John H, it may be just me but pretty much *all* the fonts in your screenshot
look quite poor and noticeably different from native font rendering.  If you
look for instance at the text in the Plot section, to me that text looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how the
glyph 2 is rendered on my system (it has a thick appearing curve attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
268,435,456 total   --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being
managed

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources
(5.3%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
2 resources locked
(2.7%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
43 resources contain interesting data
(57.3%) --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
0 resources disappeared
(0.0%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)

I also have this in main, before Application.launch is called:

  System.setProperty(prism.lcdtext, false);

In .root in CSS I have:

-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are
tweaked depending on location).

--John

On 21/08/2013 20:51, Felipe Heidrich wrote:

John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to

pixel grid aligned).

That said, on Windows for grayscale text, we are not doing that (yet). Are

you running Windows, with D3D pipeline ?

I would need to see a picture to be sure I understand the problem you

describe.

Felipe


On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:


I think I also noticed a change in font rendering around b99 somewhere...

the fonts seem to be thinner than before, or perhaps more poorly aligned
with pixel boundaries.  I'd prefer glyphs laid out in the same way each
time, ie. letters are always on a new pixel boundary, so the same letter
will look the same regardless of what preceeds it.  I have LCD rendering
turned off as I donot appreciate colored fringes on my glyphs.

On 21/08/2013 14:53, John C. Turnbull wrote:

I have only really tested JavaFX extensively on Windows so my
comments here apply mainly to that platform.



It seems that even with a font smoothing type of LCD, font rendering
in JavaFX is not at the same level of quality of native
applications.  My current experiences are with JavaFX 8 b103 and I
find that all rendered text in JavaFX appears of a significantly
poorer quality than that which I would see in Word for example or
even in IE10 (which I believe uses the same text rendering engine).

Also, these observations are based on text in standard

controls and the quality of font rendering is dramatically worse
within the Canvas control.



I am not an expert in font technology but I have read many times
that the levels of antialiasing for text that can be achieved in a
GPU-based renderer are always going to be less than that achieved in a

CPU-based renderer.

This is often explained on the basis of graphics card drivers being
optimised for performance and the rapid rendering of triangles
commonly required in games rather than for rendering quality when it

comes to text.

Is this the reason why JavaFX font rendering appears less legible
and of a lower quality than native apps?

If so, how does IE10 for example achieve a higher quality of
rendering when it seems to also use DirectWrite?

Is the quality of JavaFX font rendering ever going to improve?



Thanks,



-jct





Re: Poor quality font rendering

2013-08-28 Thread Phil Race
If you let Label choose the colours, they are different, but your eye 
has to be pretty good.
The foreground colour of the label text is not exactly black even though 
you think it is.

You'll need to force it.

Also the background fill chosen by the layout managers seems to be not 
quite white either.


So the end result is poorer contrast than straight black on white.

In this code below, I've forced a white background and a black 
foreground and

the results are identical on my Win7 x64 box.

I've got a VBox as parent of both Label and Text but in your app its 
possible

that you 'happen' to have pure white for Text already, which makes the
comparison against the UI control more apparent.

I do not know where/why the f/g and the b/g are 'tweaked' but they
look superficially like black  white so people who want those think
they have nothing to do, yet its not exactly so.

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.paint.*;
import javafx.scene.text.Font;
import javafx.scene.text.FontSmoothingType;
import javafx.scene.text.*;
import javafx.scene.text.Text;
import javafx.scene.Node;
import javafx.scene.layout.VBox;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class TextComp extends Application {

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

@Override public void start(Stage stage) {
String str = Hello World;
Text t = new Text(10, 150, str);
t.setFontSmoothingType(FontSmoothingType.LCD);
Label l = new Label(str);
l.setTextFill(Color.BLACK);
VBox vb = new VBox();
BackgroundFill bgFill = new BackgroundFill(Color.WHITE, null, 
null);

Background bg = new Background(bgFill);
vb.setBackground(bg);
Scene s = new Scene(vb);
stage.setScene(s);
vb.getChildren().add(t);
vb.getChildren().add(l);
stage.show();
}
}

-phil.


On 8/28/2013 3:48 PM, John C. Turnbull wrote:

Hi Danno,

  


I am comparing Text with LCD smoothing and Label (untouched) so shouldn't
they both be using LCD smoothing and look the same?  They actually look
quite different.

  


-jct

  


From: Danno Ferrin [mailto:danno.fer...@shemnon.com]
Sent: Thursday, 29 August 2013 01:28
To: Scott Palmer
Cc: John C. Turnbull; openjfx-dev@openjdk.java.net Mailing
Subject: Re: Poor quality font rendering

  


Are you seeing the different defaults for LCD smoothing?  The Text default
is Grey and the Control default (which Label inherits) is LCD.

  


On Wed, Aug 28, 2013 at 5:23 AM, Scott Palmer swpal...@gmail.com
mailto:swpal...@gmail.com  wrote:

From what I have observed, Text and Label appear to have different defaults
for when antialiasing is applied.  Text will do it always, Label only when
the font is greater than a certain size.

Scott


On 2013-08-28, at 5:26 AM, John C. Turnbull ozem...@ozemail.com.au
mailto:ozem...@ozemail.com.au  wrote:


Hi Felipe,

Thanks for the info.

Is kerning planned for a Java 8 update or will it have to wait for 9?  Or
10?

One more thing I have just noticed is that the way the text is rendered in

a

Text object with LCD font smoothing is quite different from a Label (with
the Text object looking better and closer to native text).

While I concede that the better font rendering I thought I observed in
WebView is probably an illusion, there is definitely a difference between
Text and Label (at least on this machine).

Why would that be?  Are they rendered differently?

Thanks,

-jct
  





RE: Poor quality font rendering

2013-08-27 Thread John C. Turnbull
I am still hoping someone can answer my questions on this topic (included
here for convenience):

 1. When will both (1) and (2) make it into a JDK8 development build?
 2. Are there any other plans/techniques to improve font rendering on the
horizon for JFX8 or later?

But I noticed something further which I think is a little curious...

It may just be an optical illusion but it definitely appears to me that font
rendering within WebView is of a considerably better quality than that in
other controls (such as Label, Text) in the sense that it appears crisper
and much closer to the native font rendering of the Windows OS.

So I would like to add another question:

3. Is this just my imagination?

I realise that it's WebKit that contains the rendering code but I would have
thought that the exact same Prism calls would be made from within this
renderer as would be used by other controls so I don't see why there would
be any difference.

Thanks,

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John C. Turnbull
Sent: Friday, 23 August 2013 17:23
To: 'Phil Race'; 'John Hendrikx'; 'Felipe Heidrich'
Cc: openjfx-dev@openjdk.java.net
Subject: RE: Poor quality font rendering

OK, thanks to everyone who has contributed input to this thread - it's been
most enlightening.

So, in summary, it seems that the dark art of font rendering is complex and
made more so by having to support numerous different operating systems, font
engines, GPUs and monitors etc.

I am sure JavaFX does a pretty good job already under most circumstances but
I (personally) hope things improve further in the future and that the gap
between JavaFX font rendering quality and that of native font rendering is
narrowed.

To this end, there seem to be two main improvements already under
development namely:

1. Sub-pixel positioning ( https://javafx-jira.kenai.com/browse/RT-14187 )
2. Kerning ( https://javafx-jira.kenai.com/browse/RT-7472 )

To assist me in my decision making and planning, would it be possible for
someone to answer:

1. When will both (1) and (2) make it into a JDK8 development build?
2. Are there any other plans/techniques to improve font rendering on the
horizon for JFX8 or later?

As I said, my focus is Windows 7 and Windows 8 at the moment so even if you
can only answer within these contexts it would be much appreciated!

Thanks,

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Phil Race
Sent: Friday, 23 August 2013 06:57
To: John Hendrikx
Cc: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering

On 8/22/2013 1:23 PM, John Hendrikx wrote:
 Oh.. I forgot to say this, but...

 Screenshots taken with LCD smoothing on are always gonna end up 
 looking different on different monitors... if for example your monitor 
 has slightly different spacing or a different order of the subpixels 
 (or you rotated it), then the screenshot will look wierd.  I prefer to 
 keep LCD smoothing off as I make screenshots / videos regularly and I 
 donot know on what system they'll be viewed on.  So if one of shots 
 has particularly bad colored fringes, it is likely you have a monitor 
 that has a different configuration than mine.

Yes. I have a BGR monitor here :-)

90 degrees rotation also invalidates the LCD but it doesn't look as bad as
getting RGB-BGR wrong

Devices like the i-whatsit and Android ones don't use LCD and I think that
is one reason.
OLED displays don't work well with it either.

Windows is deficient in that it doesn't provide anyway to set LCD on a
per-screen basis and it should. But most about every desktop/laptop is
normal rotation LCD in RGB format.

-phil.





Re: Poor quality font rendering

2013-08-27 Thread Felipe Heidrich

Hi John,

 1. Sub-pixel positioning ( https://javafx-jira.kenai.com/browse/RT-14187 )

Yes, if all goes well RT-14187 will get fixed for FX8.

Notes:
-On Mac we already have sub-pixel positioned glyphs.
-LCD text we also have sub-pixel positioned glyphs.
-The main one that I feel we are missing is grayscale text for Windows.
-It is very unlikely we will have time to do anything for Linux this time 
around.


2. Kerning ( https://javafx-jira.kenai.com/browse/RT-7472 )

Not target for 8.

3. Is it just my imagination.

Webview node and text node both use the very same drawing code in Prism.
I would not expect to see any difference...

I hope this helps,
Felipe


On Aug 27, 2013, at 3:42 AM, John C. Turnbull wrote:

 I am still hoping someone can answer my questions on this topic (included
 here for convenience):
 
 1. When will both (1) and (2) make it into a JDK8 development build?
 2. Are there any other plans/techniques to improve font rendering on the
 horizon for JFX8 or later?
 
 But I noticed something further which I think is a little curious...
 
 It may just be an optical illusion but it definitely appears to me that font
 rendering within WebView is of a considerably better quality than that in
 other controls (such as Label, Text) in the sense that it appears crisper
 and much closer to the native font rendering of the Windows OS.
 
 So I would like to add another question:
 
 3. Is this just my imagination?
 
 I realise that it's WebKit that contains the rendering code but I would have
 thought that the exact same Prism calls would be made from within this
 renderer as would be used by other controls so I don't see why there would
 be any difference.
 
 Thanks,
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John C. Turnbull
 Sent: Friday, 23 August 2013 17:23
 To: 'Phil Race'; 'John Hendrikx'; 'Felipe Heidrich'
 Cc: openjfx-dev@openjdk.java.net
 Subject: RE: Poor quality font rendering
 
 OK, thanks to everyone who has contributed input to this thread - it's been
 most enlightening.
 
 So, in summary, it seems that the dark art of font rendering is complex and
 made more so by having to support numerous different operating systems, font
 engines, GPUs and monitors etc.
 
 I am sure JavaFX does a pretty good job already under most circumstances but
 I (personally) hope things improve further in the future and that the gap
 between JavaFX font rendering quality and that of native font rendering is
 narrowed.
 
 To this end, there seem to be two main improvements already under
 development namely:
 
 1. Sub-pixel positioning ( https://javafx-jira.kenai.com/browse/RT-14187 )
 2. Kerning ( https://javafx-jira.kenai.com/browse/RT-7472 )
 
 To assist me in my decision making and planning, would it be possible for
 someone to answer:
 
 1. When will both (1) and (2) make it into a JDK8 development build?
 2. Are there any other plans/techniques to improve font rendering on the
 horizon for JFX8 or later?
 
 As I said, my focus is Windows 7 and Windows 8 at the moment so even if you
 can only answer within these contexts it would be much appreciated!
 
 Thanks,
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Phil Race
 Sent: Friday, 23 August 2013 06:57
 To: John Hendrikx
 Cc: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 On 8/22/2013 1:23 PM, John Hendrikx wrote:
 Oh.. I forgot to say this, but...
 
 Screenshots taken with LCD smoothing on are always gonna end up 
 looking different on different monitors... if for example your monitor 
 has slightly different spacing or a different order of the subpixels 
 (or you rotated it), then the screenshot will look wierd.  I prefer to 
 keep LCD smoothing off as I make screenshots / videos regularly and I 
 donot know on what system they'll be viewed on.  So if one of shots 
 has particularly bad colored fringes, it is likely you have a monitor 
 that has a different configuration than mine.
 
 Yes. I have a BGR monitor here :-)
 
 90 degrees rotation also invalidates the LCD but it doesn't look as bad as
 getting RGB-BGR wrong
 
 Devices like the i-whatsit and Android ones don't use LCD and I think that
 is one reason.
 OLED displays don't work well with it either.
 
 Windows is deficient in that it doesn't provide anyway to set LCD on a
 per-screen basis and it should. But most about every desktop/laptop is
 normal rotation LCD in RGB format.
 
 -phil.
 
 
 



Re: Poor quality font rendering

2013-08-27 Thread Felipe Heidrich
Hi John

Thank you for the images!

Comparing DirectWrite versus T2K for grayscale text the main difference that 
jumps at me is that in DirectWrite (which is what you get when prism.text=t2k 
is not set) the glyphs look a touch taller, looking somewhat stretched. 
Inspecting it closely you can see the actual pixel size is the same, it is the 
anti-aliasing at the top that is different.
I'll see if anything can be done differently in DirectWrite to avoid this 
'stretched' look, would that be better ?

DirectWrite LCD for me is the one that gives the best result. That said, that 
is something wrong going on in the text over the progress bar.

Is it possible to run the same test case on Mac ? (Grayscale text, 
prism.text=t2k *not* set).

Regards
Felipe


On Aug 22, 2013, at 12:54 PM, John Hendrikx wrote:

 On 22/08/2013 17:38, Felipe Heidrich wrote:
 
 John, for the sake of testing.
 
 Could you enable LCD text for the plot Label in your app ?
 Please let me know if that improves the position of each glyph (relative to 
 one another).
 
 You should also try your app using our previous text rasterizer, run with 
 -Dprism.text=t2k
 Is that better for you ?
 
 Sure, I've created approximately the same shots with different settings for 
 comparison:
 
 prism.lcdtext=false
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 prism.lcdtext=true
 http://ukyo.xs4all.nl/LCDSmoothed.png
 
 prism.lcdtext=true, prism.text=t2k
 http://ukyo.xs4all.nl/LCDSmoothedT2K.png
 
 prism.lcdtext=false, prism.text=t2k
 http://ukyo.xs4all.nl/GrayscaleT2K.png
 
 Now that I compared them all, the last one is how it was for the longest 
 time.  Now I also noticed that in the last shot the font height is a pixel 
 smaller, which is one the changes I couldn't put my finger on.
 
 The LCD smoothed versions look quite good, but (as you can see in screenshot 
 2) it for same reason garbles my memory indicator when the background image 
 is fading in.  After the fade-in completes, the text is correct (I 
 screenshotted it just before the fade-in completes to show the garbled text). 
  This occurs with both the normal and t2k renderer when LCD text is on.
 
 So, to make it clear:
 
 1) Grayscale only: some glyphs look akward when bolded
 2) Grayscale only + t2k: this is how I expected it to be (I tuned the look 
 for that).  Apparently this default has changed(?).  The font in the top bar 
 seems to be 1 pixel less high then in all the other version.
 3) LCD only: Looks quite good on my normal LCD screens (better than Windows 
 in my opinion, but perhaps the light-on-dark vs dark-on-light is the cause of 
 that)
 4) LCD only + t2k: Also looks good, I think (3) looks better though
 
 3+4 fail when I drag the Window to my projector.  Colored fringes are 
 visible.  This is probably a driver problem as Windows may not realize that 
 my Projector is not using LCD (DLP projector).  I'm not sure how JavaFX 
 figures this out, but I assume it asks Windows for this information.
 
 --John
 
 
 
 Regards,
 Felipe
 
 
 
 On Aug 22, 2013, at 7:05 AM, John Hendrikx wrote:
 
 Those are all normal controls, the plot section is just a Label for example.
 
 On 22/08/2013 13:39, John C. Turnbull wrote:
 John H, it may be just me but pretty much *all* the fonts in your 
 screenshot
 look quite poor and noticeably different from native font rendering.  If 
 you
 look for instance at the text in the Plot section, to me that text looks
 awful.
 
 Is that inside a WebView or some other control?
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 
 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar 
 are
 rendered somewhat wierd.
 
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):
 
 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary

RE: Poor quality font rendering

2013-08-23 Thread John C. Turnbull
OK, thanks to everyone who has contributed input to this thread - it's been
most enlightening.

So, in summary, it seems that the dark art of font rendering is complex and
made more so by having to support numerous different operating systems, font
engines, GPUs and monitors etc.

I am sure JavaFX does a pretty good job already under most circumstances but
I (personally) hope things improve further in the future and that the gap
between JavaFX font rendering quality and that of native font rendering is
narrowed.

To this end, there seem to be two main improvements already under
development namely:

1. Sub-pixel positioning ( https://javafx-jira.kenai.com/browse/RT-14187 )
2. Kerning ( https://javafx-jira.kenai.com/browse/RT-7472 )

To assist me in my decision making and planning, would it be possible for
someone to answer:

1. When will both (1) and (2) make it into a JDK8 development build?
2. Are there any other plans/techniques to improve font rendering on the
horizon for JFX8 or later?

As I said, my focus is Windows 7 and Windows 8 at the moment so even if you
can only answer within these contexts it would be much appreciated!

Thanks,

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Phil Race
Sent: Friday, 23 August 2013 06:57
To: John Hendrikx
Cc: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering

On 8/22/2013 1:23 PM, John Hendrikx wrote:
 Oh.. I forgot to say this, but...

 Screenshots taken with LCD smoothing on are always gonna end up 
 looking different on different monitors... if for example your monitor 
 has slightly different spacing or a different order of the subpixels 
 (or you rotated it), then the screenshot will look wierd.  I prefer to 
 keep LCD smoothing off as I make screenshots / videos regularly and I 
 donot know on what system they'll be viewed on.  So if one of shots 
 has particularly bad colored fringes, it is likely you have a monitor 
 that has a different configuration than mine.

Yes. I have a BGR monitor here :-)

90 degrees rotation also invalidates the LCD but it doesn't look as bad as
getting RGB-BGR wrong

Devices like the i-whatsit and Android ones don't use LCD and I think that
is one reason.
OLED displays don't work well with it either.

Windows is deficient in that it doesn't provide anyway to set LCD on a
per-screen basis and it should. But most about every desktop/laptop is
normal rotation LCD in RGB format.

-phil.





Re: Poor quality font rendering

2013-08-23 Thread John Smith
I'm interested in the answers to John T's questions for Linux as well, as there 
have been reports that font rendering there could use some improvement (though 
I don't have a Linux machine to test it and the reports don't back themselves 
up with screen shots or quantifiable data).

http://stackoverflow.com/questions/18382969/can-the-rendering-of-the-javafx-2-8-font-be-improved

(sorry to add another John to the thread to confuse it ;-)

Regards,
John Smith

Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx


I took another good look, and I see what is bothering me is mostly how 
the glyph 2 is rendered on my system (it has a thick appearing curve 
attached to the base).  I've included a screenshot of my application 
that uses several different sizes fonts, but it seems only the ones in 
the top bar are rendered somewhat wierd.


http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this 
stuff in log in an infinite loop, so must be D3D I think):


D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%), 
268,435,456 total   -- 
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being 
managed  
-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources 
(5.3%)  
-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
2 resources locked 
(2.7%) 
-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
43 resources contain interesting data 
(57.3%) -- 
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
0 resources disappeared 
(0.0%)
-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)


I also have this in main, before Application.launch is called:

System.setProperty(prism.lcdtext, false);

In .root in CSS I have:

  -fx-font-family: Arial;
  -fx-font-size: 16px;
  -fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are 
tweaked depending on location).


--John

On 21/08/2013 20:51, Felipe Heidrich wrote:

John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to pixel 
grid aligned).

That said, on Windows for grayscale text, we are not doing that (yet). Are you 
running Windows, with D3D pipeline ?
I would need to see a picture to be sure I understand the problem you describe.

Felipe


On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:


I think I also noticed a change in font rendering around b99 somewhere... the 
fonts seem to be thinner than before, or perhaps more poorly aligned with pixel 
boundaries.  I'd prefer glyphs laid out in the same way each time, ie. letters 
are always on a new pixel boundary, so the same letter will look the same 
regardless of what preceeds it.  I have LCD rendering turned off as I donot 
appreciate colored fringes on my glyphs.

On 21/08/2013 14:53, John C. Turnbull wrote:

I have only really tested JavaFX extensively on Windows so my comments here
apply mainly to that platform.



It seems that even with a font smoothing type of LCD, font rendering in
JavaFX is not at the same level of quality of native applications.  My
current experiences are with JavaFX 8 b103 and I find that all rendered text
in JavaFX appears of a significantly poorer quality than that which I would
see in Word for example or even in IE10 (which I believe uses the same text
rendering engine).  Also, these observations are based on text in standard
controls and the quality of font rendering is dramatically worse within the
Canvas control.



I am not an expert in font technology but I have read many times that the
levels of antialiasing for text that can be achieved in a GPU-based renderer
are always going to be less than that achieved in a CPU-based renderer.
This is often explained on the basis of graphics card drivers being
optimised for performance and the rapid rendering of triangles commonly
required in games rather than for rendering quality when it comes to text.



Is this the reason why JavaFX font rendering appears less legible and of a
lower quality than native apps?

If so, how does IE10 for example achieve a higher quality of rendering when
it seems to also use DirectWrite?

Is the quality of JavaFX font rendering ever going to improve?



Thanks,



-jct





RE: Poor quality font rendering

2013-08-22 Thread John C. Turnbull
Hi Richard,

I do not know enough about font technology to be able to identify exactly
what the nature of the difference between native and JavaFX font rendering
is.  All I can really say is that there *is* a difference firstly and
secondly that the fonts rendered by JavaFX don't look as aesthetically
pleasing as the native ones.  I guess they do not look as crisp (i.e. appear
a little bit fuzzy) and some of the glyphs appear to not be quite right in
the sense that they are blurry and almost see-through.

This reminds me of a problem I have had in developing UIs with Java over the
years namely that it's really hard to get a Java application to look like a
native one.  I had hoped that this problem would be solved with JavaFX but
it appears that it's still going to be obvious to the end user that my
JavaFX application is just that: a Java application and not a native one.

I believe that subtle differences in the rendering quality of fonts are
noticeable to the user, even if they do not know why their app does not look
quite right.

Felipe, are you able to say if what we have with JavaFX font rendering on
Windows currently is as good as it is going to get or are there further
enhancements planned?

Thanks,

-jct

-Original Message-
From: Richard Bair [mailto:richard.b...@oracle.com] 
Sent: Thursday, 22 August 2013 01:16
To: John C. Turnbull
Cc: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering

We're using the native font rasterizer. Can you explain font render in
JavaFX is not at the same level of quality of native applications? Is it
the shape of the glyphs, or how they are laid out relative to one another,
or something else?

The GPU-based and CPU-based issue is a red herring. We're using the CPU
for producing the masks (or whatever technique the native rasterizer is
using) and then the GPU is treating it as an image (which it fills with
whatever paint you've supplied).

Richard

On Aug 21, 2013, at 5:53 AM, John C. Turnbull ozem...@ozemail.com.au
wrote:

 I have only really tested JavaFX extensively on Windows so my comments 
 here apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering 
 in JavaFX is not at the same level of quality of native applications.  
 My current experiences are with JavaFX 8 b103 and I find that all 
 rendered text in JavaFX appears of a significantly poorer quality than 
 that which I would see in Word for example or even in IE10 (which I 
 believe uses the same text rendering engine).  Also, these observations
are based on text in standard
 controls and the quality of font rendering is dramatically worse 
 within the Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times that 
 the levels of antialiasing for text that can be achieved in a 
 GPU-based renderer are always going to be less than that achieved in a
CPU-based renderer.
 This is often explained on the basis of graphics card drivers being 
 optimised for performance and the rapid rendering of triangles 
 commonly required in games rather than for rendering quality when it comes
to text.
 
 
 
 Is this the reason why JavaFX font rendering appears less legible and 
 of a lower quality than native apps?
 
 If so, how does IE10 for example achieve a higher quality of rendering 
 when it seems to also use DirectWrite?
 
 Is the quality of JavaFX font rendering ever going to improve?
 
 
 
 Thanks,
 
 
 
 -jct
 



RE: Poor quality font rendering

2013-08-22 Thread John C. Turnbull
Hi Felipe,

Thanks for the info.

I will see if I can get some screenshots together that highlight the
differences and then file a JIRA issue.

The differences are not dramatic but noticeable enough to lessen the
impression of professional quality of my application (in my opinion).

P.S. I am only talking about text rendered in controls other than Canvas.
Canvas font rendering is really awful on both my Windows machines and I so
hope that LCD font smoothing is made available for Canvas before I have to
ship.

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Felipe Heidrich
Sent: Thursday, 22 August 2013 05:04
To: openjfx-dev@openjdk.java.net List
Subject: Re: Poor quality font rendering


Hi John T.

In JFX we use DirectWrite to produce glyph images, which I believe it what
IE10 uses (once upon the time I heard that Word used Uniscribe, which is a
different MS library for text. Nowadays, I have no clue).

Although we use the same base library it is possible to have differences
caused by:
a) we are still using our shader program to produce sub-pixel positioned
glyphs (LCD).
b) using different values for gamma correction (unlikely)

But these problems would only cause very very subtle differences in the
rendering (I think), and with a bit more time I should be able to fix both.

Could you please provide a picture of exact case you are seeing (maybe file
a jira) ?

Thank  you
Felipe



On Aug 21, 2013, at 5:53 AM, John C. Turnbull wrote:

 I have only really tested JavaFX extensively on Windows so my comments 
 here apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering 
 in JavaFX is not at the same level of quality of native applications.  
 My current experiences are with JavaFX 8 b103 and I find that all 
 rendered text in JavaFX appears of a significantly poorer quality than 
 that which I would see in Word for example or even in IE10 (which I 
 believe uses the same text rendering engine).  Also, these observations
are based on text in standard
 controls and the quality of font rendering is dramatically worse 
 within the Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times that 
 the levels of antialiasing for text that can be achieved in a 
 GPU-based renderer are always going to be less than that achieved in a
CPU-based renderer.
 This is often explained on the basis of graphics card drivers being 
 optimised for performance and the rapid rendering of triangles 
 commonly required in games rather than for rendering quality when it comes
to text.
 
 
 
 Is this the reason why JavaFX font rendering appears less legible and 
 of a lower quality than native apps?
 
 If so, how does IE10 for example achieve a higher quality of rendering 
 when it seems to also use DirectWrite?
 
 Is the quality of JavaFX font rendering ever going to improve?
 
 
 
 Thanks,
 
 
 
 -jct
 



RE: Poor quality font rendering

2013-08-22 Thread John C. Turnbull
John H, it may be just me but pretty much *all* the fonts in your screenshot
look quite poor and noticeably different from native font rendering.  If you
look for instance at the text in the Plot section, to me that text looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how the
glyph 2 is rendered on my system (it has a thick appearing curve attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%), 
268,435,456 total   -- 
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being 
managed

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources 
(5.3%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
2 resources locked 
(2.7%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
43 resources contain interesting data 
(57.3%) -- 
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
0 resources disappeared 
(0.0%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)

I also have this in main, before Application.launch is called:

 System.setProperty(prism.lcdtext, false);

In .root in CSS I have:

   -fx-font-family: Arial;
   -fx-font-size: 16px;
   -fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are
tweaked depending on location).

--John

On 21/08/2013 20:51, Felipe Heidrich wrote:
 John H:

 In JFX we decided to go with sub-pixel positioned text (as opposite to
pixel grid aligned).

 That said, on Windows for grayscale text, we are not doing that (yet). Are
you running Windows, with D3D pipeline ?
 I would need to see a picture to be sure I understand the problem you
describe.

 Felipe


 On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:

 I think I also noticed a change in font rendering around b99 somewhere...
the fonts seem to be thinner than before, or perhaps more poorly aligned
with pixel boundaries.  I'd prefer glyphs laid out in the same way each
time, ie. letters are always on a new pixel boundary, so the same letter
will look the same regardless of what preceeds it.  I have LCD rendering
turned off as I donot appreciate colored fringes on my glyphs.

 On 21/08/2013 14:53, John C. Turnbull wrote:
 I have only really tested JavaFX extensively on Windows so my 
 comments here apply mainly to that platform.



 It seems that even with a font smoothing type of LCD, font rendering 
 in JavaFX is not at the same level of quality of native 
 applications.  My current experiences are with JavaFX 8 b103 and I 
 find that all rendered text in JavaFX appears of a significantly 
 poorer quality than that which I would see in Word for example or 
 even in IE10 (which I believe uses the same text rendering engine).
Also, these observations are based on text in standard
 controls and the quality of font rendering is dramatically worse 
 within the Canvas control.



 I am not an expert in font technology but I have read many times 
 that the levels of antialiasing for text that can be achieved in a 
 GPU-based renderer are always going to be less than that achieved in a
CPU-based renderer.
 This is often explained on the basis of graphics card drivers being 
 optimised for performance and the rapid rendering of triangles 
 commonly required in games rather than for rendering quality when it
comes to text.



 Is this the reason why JavaFX font rendering appears less legible 
 and of a lower quality than native apps?

 If so, how does IE10 for example achieve a higher quality of 
 rendering when it seems to also use DirectWrite?

 Is the quality of JavaFX font rendering ever going to improve?



 Thanks,



 -jct




Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx


Those are all normal controls, the plot section is just a Label for 
example.


On 22/08/2013 13:39, John C. Turnbull wrote:

John H, it may be just me but pretty much *all* the fonts in your screenshot
look quite poor and noticeably different from native font rendering.  If you
look for instance at the text in the Plot section, to me that text looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how the
glyph 2 is rendered on my system (it has a thick appearing curve attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
268,435,456 total   --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being
managed

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources
(5.3%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
2 resources locked
(2.7%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
43 resources contain interesting data
(57.3%) --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
0 resources disappeared
(0.0%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)

I also have this in main, before Application.launch is called:

  System.setProperty(prism.lcdtext, false);

In .root in CSS I have:

-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are
tweaked depending on location).

--John

On 21/08/2013 20:51, Felipe Heidrich wrote:

John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to

pixel grid aligned).

That said, on Windows for grayscale text, we are not doing that (yet). Are

you running Windows, with D3D pipeline ?

I would need to see a picture to be sure I understand the problem you

describe.

Felipe


On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:


I think I also noticed a change in font rendering around b99 somewhere...

the fonts seem to be thinner than before, or perhaps more poorly aligned
with pixel boundaries.  I'd prefer glyphs laid out in the same way each
time, ie. letters are always on a new pixel boundary, so the same letter
will look the same regardless of what preceeds it.  I have LCD rendering
turned off as I donot appreciate colored fringes on my glyphs.

On 21/08/2013 14:53, John C. Turnbull wrote:

I have only really tested JavaFX extensively on Windows so my
comments here apply mainly to that platform.



It seems that even with a font smoothing type of LCD, font rendering
in JavaFX is not at the same level of quality of native
applications.  My current experiences are with JavaFX 8 b103 and I
find that all rendered text in JavaFX appears of a significantly
poorer quality than that which I would see in Word for example or
even in IE10 (which I believe uses the same text rendering engine).

Also, these observations are based on text in standard

controls and the quality of font rendering is dramatically worse
within the Canvas control.



I am not an expert in font technology but I have read many times
that the levels of antialiasing for text that can be achieved in a
GPU-based renderer are always going to be less than that achieved in a

CPU-based renderer.

This is often explained on the basis of graphics card drivers being
optimised for performance and the rapid rendering of triangles
commonly required in games rather than for rendering quality when it

comes to text.



Is this the reason why JavaFX font rendering appears less legible
and of a lower quality than native apps?

If so, how does IE10 for example achieve a higher quality of
rendering when it seems to also use DirectWrite?

Is the quality of JavaFX font rendering ever going to improve?



Thanks,



-jct





Re: Poor quality font rendering

2013-08-22 Thread Scott Palmer
To do a fair comparison you need to use the same font face,size, foreground
and background colors, etc.  and compare the native and java -rendered
text side by side (even at the same pixel coordinates in case it makes a
difference).

John H. mentioned Arial 16px normal in the CSS, and he mentions the
sizes and weights are tweaked depending on location -  the 2 that is
rendering awkward looks like it has been made bold - probably via a
transformation applied to the original font rather than selecting a
naturally bold typeface.  It's not always easy to tell though.

I've seen poor font rendering in native applications too. (Web browsers on
Linux are notoriously bad at making text look awful)

I would try the same exact rendering in HTML and show it in a few different
browers to compare.  Then try the same thing in a word processor, etc.  See
if the context of the rendering affects the quality in non-Java
applications as well.

Scott



On Thu, Aug 22, 2013 at 7:39 AM, John C. Turnbull ozem...@ozemail.com.auwrote:

 John H, it may be just me but pretty much *all* the fonts in your
 screenshot
 look quite poor and noticeably different from native font rendering.  If
 you
 look for instance at the text in the Plot section, to me that text looks
 awful.

 Is that inside a WebView or some other control?

 -jct

 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering


 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar
 are
 rendered somewhat wierd.

 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):

 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed

 --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)

 --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)

 --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
 0 resources disappeared
 (0.0%)

 --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)

 I also have this in main, before Application.launch is called:

  System.setProperty(prism.lcdtext, false);

 In .root in CSS I have:

-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;

 So all the fonts you see should be Arial (but the sizes and weights are
 tweaked depending on location).

 --John

 On 21/08/2013 20:51, Felipe Heidrich wrote:
  John H:
 
  In JFX we decided to go with sub-pixel positioned text (as opposite to
 pixel grid aligned).
 
  That said, on Windows for grayscale text, we are not doing that (yet).
 Are
 you running Windows, with D3D pipeline ?
  I would need to see a picture to be sure I understand the problem you
 describe.
 
  Felipe
 
 
  On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:
 
  I think I also noticed a change in font rendering around b99
 somewhere...
 the fonts seem to be thinner than before, or perhaps more poorly aligned
 with pixel boundaries.  I'd prefer glyphs laid out in the same way each
 time, ie. letters are always on a new pixel boundary, so the same letter
 will look the same regardless of what preceeds it.  I have LCD rendering
 turned off as I donot appreciate colored fringes on my glyphs.
 
  On 21/08/2013 14:53, John C. Turnbull wrote:
  I have only really tested JavaFX extensively on Windows so my
  comments here apply mainly to that platform.
 
 
 
  It seems that even with a font smoothing type of LCD, font rendering
  in JavaFX is not at the same level of quality of native
  applications.  My current experiences are with JavaFX 8 b103 and I
  find that all rendered text in JavaFX appears of a significantly
  poorer quality than that which I would see in Word for example or
  even in IE10 (which I believe uses the same text rendering engine).
 Also, these observations are based on text in standard
  controls and the quality of font rendering is dramatically worse
  within the Canvas control.
 
 
 
  I am not an expert in font technology but I have read many times
  that the levels of antialiasing for text that can be achieved in a
  GPU

Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx

On 22/08/2013 16:45, Phil Race wrote:

On 8/22/13 12:29 AM, John Hendrikx wrote:




System.setProperty(prism.lcdtext, false);




So you deliberately asked for it to be different than usual Windows 
apps ?
I'm not sure why you do this, but if its in effect we can't expect to 
make any
comparisons since IE10 etc will use LCD text I think. Its is the case 
on Windows

pretty much everywhere MS can apply it.
Sorry, don't confuse me with John T. -- I don't know what he did.   I've 
turned it off simply because of the numerous issues with LCD rendering 
(but those are not JavaFX specific) -- it is turned off system-wide 
though, so if I wanted to make a comparison, I should still be able to.


Anyway, I'm not making any direct comparisons (certainly not with IE10), 
but look at the screenshot, and see how poorly the 2 glyph is rendered 
in the top bar.  This wasn't like that before and I've had that top bar 
in for well over a year now.


--John



Re: Poor quality font rendering

2013-08-22 Thread Felipe Heidrich
Hi,

The text in the plot section is probably going to look better when we fix:
https://javafx-jira.kenai.com/browse/RT-14187  (planned for 8.0)
Note that using LCD text improves subpixel position.

Another missing feature (in JFX) that would help in there is font kerning 
https://javafx-jira.kenai.com/browse/RT-7472 (not planned for 8.0)

As for the weird looking '2' at the top that I don't know what it is, the 
easier thing to do is to use a different font.

Also keeping in mind when comparing text (JFX versus whatever) make sure to the 
same string, same font, and same background too.

Regards
Felipe



On Aug 22, 2013, at 7:05 AM, John Hendrikx wrote:

 
 Those are all normal controls, the plot section is just a Label for example.
 
 On 22/08/2013 13:39, John C. Turnbull wrote:
 John H, it may be just me but pretty much *all* the fonts in your screenshot
 look quite poor and noticeably different from native font rendering.  If you
 look for instance at the text in the Plot section, to me that text looks
 awful.
 
 Is that inside a WebView or some other control?
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 
 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar are
 rendered somewhat wierd.
 
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):
 
 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
 0 resources disappeared
 (0.0%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)
 
 I also have this in main, before Application.launch is called:
 
  System.setProperty(prism.lcdtext, false);
 
 In .root in CSS I have:
 
-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;
 
 So all the fonts you see should be Arial (but the sizes and weights are
 tweaked depending on location).
 
 --John
 
 On 21/08/2013 20:51, Felipe Heidrich wrote:
 John H:
 
 In JFX we decided to go with sub-pixel positioned text (as opposite to
 pixel grid aligned).
 That said, on Windows for grayscale text, we are not doing that (yet). Are
 you running Windows, with D3D pipeline ?
 I would need to see a picture to be sure I understand the problem you
 describe.
 Felipe
 
 
 On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:
 
 I think I also noticed a change in font rendering around b99 somewhere...
 the fonts seem to be thinner than before, or perhaps more poorly aligned
 with pixel boundaries.  I'd prefer glyphs laid out in the same way each
 time, ie. letters are always on a new pixel boundary, so the same letter
 will look the same regardless of what preceeds it.  I have LCD rendering
 turned off as I donot appreciate colored fringes on my glyphs.
 On 21/08/2013 14:53, John C. Turnbull wrote:
 I have only really tested JavaFX extensively on Windows so my
 comments here apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering
 in JavaFX is not at the same level of quality of native
 applications.  My current experiences are with JavaFX 8 b103 and I
 find that all rendered text in JavaFX appears of a significantly
 poorer quality than that which I would see in Word for example or
 even in IE10 (which I believe uses the same text rendering engine).
 Also, these observations are based on text in standard
 controls and the quality of font rendering is dramatically worse
 within the Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times
 that the levels of antialiasing for text that can be achieved in a
 GPU-based renderer are always going to be less than that achieved in a
 CPU-based renderer.
 This is often explained on the basis of graphics card drivers being
 optimised for performance and the rapid rendering of triangles
 commonly required in games

Re: Poor quality font rendering

2013-08-22 Thread Felipe Heidrich


John, for the sake of testing.

Could you enable LCD text for the plot Label in your app ?
Please let me know if that improves the position of each glyph (relative to one 
another).

You should also try your app using our previous text rasterizer, run with 
-Dprism.text=t2k
Is that better for you ?

Regards,
Felipe



On Aug 22, 2013, at 7:05 AM, John Hendrikx wrote:

 
 Those are all normal controls, the plot section is just a Label for example.
 
 On 22/08/2013 13:39, John C. Turnbull wrote:
 John H, it may be just me but pretty much *all* the fonts in your screenshot
 look quite poor and noticeably different from native font rendering.  If you
 look for instance at the text in the Plot section, to me that text looks
 awful.
 
 Is that inside a WebView or some other control?
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 
 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar are
 rendered somewhat wierd.
 
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):
 
 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
 0 resources disappeared
 (0.0%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)
 
 I also have this in main, before Application.launch is called:
 
  System.setProperty(prism.lcdtext, false);
 
 In .root in CSS I have:
 
-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;
 
 So all the fonts you see should be Arial (but the sizes and weights are
 tweaked depending on location).
 
 --John
 
 On 21/08/2013 20:51, Felipe Heidrich wrote:
 John H:
 
 In JFX we decided to go with sub-pixel positioned text (as opposite to
 pixel grid aligned).
 That said, on Windows for grayscale text, we are not doing that (yet). Are
 you running Windows, with D3D pipeline ?
 I would need to see a picture to be sure I understand the problem you
 describe.
 Felipe
 
 
 On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:
 
 I think I also noticed a change in font rendering around b99 somewhere...
 the fonts seem to be thinner than before, or perhaps more poorly aligned
 with pixel boundaries.  I'd prefer glyphs laid out in the same way each
 time, ie. letters are always on a new pixel boundary, so the same letter
 will look the same regardless of what preceeds it.  I have LCD rendering
 turned off as I donot appreciate colored fringes on my glyphs.
 On 21/08/2013 14:53, John C. Turnbull wrote:
 I have only really tested JavaFX extensively on Windows so my
 comments here apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering
 in JavaFX is not at the same level of quality of native
 applications.  My current experiences are with JavaFX 8 b103 and I
 find that all rendered text in JavaFX appears of a significantly
 poorer quality than that which I would see in Word for example or
 even in IE10 (which I believe uses the same text rendering engine).
 Also, these observations are based on text in standard
 controls and the quality of font rendering is dramatically worse
 within the Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times
 that the levels of antialiasing for text that can be achieved in a
 GPU-based renderer are always going to be less than that achieved in a
 CPU-based renderer.
 This is often explained on the basis of graphics card drivers being
 optimised for performance and the rapid rendering of triangles
 commonly required in games rather than for rendering quality when it
 comes to text.
 
 
 Is this the reason why JavaFX font rendering appears less legible
 and of a lower quality than native apps?
 
 If so, how does IE10 for example achieve a higher quality of
 rendering when it seems to also use DirectWrite

Re: Poor quality font rendering

2013-08-22 Thread John C. Turnbull
Am I the only one who looks at that screenshot and thinks that the fonts look 
really bad and obviously different from a native app?  Its not just the Plot 
section, its all text on the screen.

This is what I am talking about.  I wouldn't even describe the differences as 
subtle as to me there is a dramatic difference in quality.

Can this be fixed or are JavaFX apps always going to stand out for all the 
wrong reasons like this?

On 23/08/2013, at 0:05, John Hendrikx hj...@xs4all.nl wrote:

 
 Those are all normal controls, the plot section is just a Label for example.
 
 On 22/08/2013 13:39, John C. Turnbull wrote:
 John H, it may be just me but pretty much *all* the fonts in your screenshot
 look quite poor and noticeably different from native font rendering.  If you
 look for instance at the text in the Plot section, to me that text looks
 awful.
 
 Is that inside a WebView or some other control?
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 
 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar are
 rendered somewhat wierd.
 
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):
 
 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
 0 resources disappeared
 (0.0%)
 
 -- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)
 
 I also have this in main, before Application.launch is called:
 
  System.setProperty(prism.lcdtext, false);
 
 In .root in CSS I have:
 
-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;
 
 So all the fonts you see should be Arial (but the sizes and weights are
 tweaked depending on location).
 
 --John
 
 On 21/08/2013 20:51, Felipe Heidrich wrote:
 John H:
 
 In JFX we decided to go with sub-pixel positioned text (as opposite to
 pixel grid aligned).
 That said, on Windows for grayscale text, we are not doing that (yet). Are
 you running Windows, with D3D pipeline ?
 I would need to see a picture to be sure I understand the problem you
 describe.
 Felipe
 
 
 On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:
 
 I think I also noticed a change in font rendering around b99 somewhere...
 the fonts seem to be thinner than before, or perhaps more poorly aligned
 with pixel boundaries.  I'd prefer glyphs laid out in the same way each
 time, ie. letters are always on a new pixel boundary, so the same letter
 will look the same regardless of what preceeds it.  I have LCD rendering
 turned off as I donot appreciate colored fringes on my glyphs.
 On 21/08/2013 14:53, John C. Turnbull wrote:
 I have only really tested JavaFX extensively on Windows so my
 comments here apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering
 in JavaFX is not at the same level of quality of native
 applications.  My current experiences are with JavaFX 8 b103 and I
 find that all rendered text in JavaFX appears of a significantly
 poorer quality than that which I would see in Word for example or
 even in IE10 (which I believe uses the same text rendering engine).
 Also, these observations are based on text in standard
 controls and the quality of font rendering is dramatically worse
 within the Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times
 that the levels of antialiasing for text that can be achieved in a
 GPU-based renderer are always going to be less than that achieved in a
 CPU-based renderer.
 This is often explained on the basis of graphics card drivers being
 optimised for performance and the rapid rendering of triangles
 commonly required in games rather than for rendering quality when it
 comes to text.
 
 
 Is this the reason why JavaFX font rendering appears less legible
 and of a lower quality than native apps

Re: Poor quality font rendering

2013-08-22 Thread John C. Turnbull
Hi Phil,

I was actually aware that LCD text was disabled in this case but what I am 
saying is that I am seeing similar stark disparities between JavaFX fonts and 
native fonts even with LCD turned on.

I think the screenshot shows what I am talking about though perhaps the quality 
is poorer than my case because of the LCD issue.

The point is that there are still differences no matter what I do and to me at 
least these differences are very, very obvious.  I am trying to establish if 
what we have now is as good as it gets or if things are going to improve.

Also, it's clear from this thread that not everyone agrees on what looks good. 
It would seem that John H is concerned only with the weird '2' and feels that 
grayscale text is better than LCD text whereas I am more concerned with 
resembling native rendering.

On 23/08/2013, at 5:21, Phil Race philip.r...@oracle.com wrote:

 John T,
 
 Per a couple of earlier emails in this thread John H is deliberately 
 disabling LCD text
 so has grey scale, hence you can't compare directly with a native app since 
 they all use LCD.
 
 Any comparison has to be
 1. Using the same string
 2. Rendered in the same fashion : LCD or greyscale, hinted/unhinted.
 3. Using the same font (face, size etc)
 4. Using the same colours (fgbg) and watch out for the UI controls - they 
 used
 to tweak your text colour so that (eg) black became dark grey, reducing 
 contrast
 which reduced legibility, thus also invalidating any  test. I am not sure if 
 this is still the case,
 but contrast is very important for text and you should make sure its as high 
 as possible.
 
 -phil.
 
 
 
 On 8/22/2013 11:35 AM, John C. Turnbull wrote:
 Am I the only one who looks at that screenshot and thinks that the fonts 
 look really bad and obviously different from a native app?  Its not just the 
 Plot section, its all text on the screen.
 
 This is what I am talking about.  I wouldn't even describe the differences 
 as subtle as to me there is a dramatic difference in quality.
 
 Can this be fixed or are JavaFX apps always going to stand out for all the 
 wrong reasons like this?
 
 On 23/08/2013, at 0:05, John Hendrikx hj...@xs4all.nl wrote:
 
 Those are all normal controls, the plot section is just a Label for example.
 
 On 22/08/2013 13:39, John C. Turnbull wrote:
 John H, it may be just me but pretty much *all* the fonts in your 
 screenshot
 look quite poor and noticeably different from native font rendering.  If 
 you
 look for instance at the text in the Plot section, to me that text looks
 awful.
 
 Is that inside a WebView or some other control?
 
 -jct
 
 -Original Message-
 From: openjfx-dev-boun...@openjdk.java.net
 [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
 Sent: Thursday, 22 August 2013 17:29
 To: openjfx-dev@openjdk.java.net
 Subject: Re: Poor quality font rendering
 
 
 I took another good look, and I see what is bothering me is mostly how the
 glyph 2 is rendered on my system (it has a thick appearing curve attached
 to the base).  I've included a screenshot of my application that uses
 several different sizes fonts, but it seems only the ones in the top bar 
 are
 rendered somewhat wierd.
 
 http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png
 
 I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
 in log in an infinite loop, so must be D3D I think):
 
 D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
 268,435,456 total   --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
 75 total resources being
 managed
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
 4 permanent resources
 (5.3%)
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
 2 resources locked
 (2.7%)
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
 43 resources contain interesting data
 (57.3%) --
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
 0 resources disappeared
 (0.0%)
 
 -- 
 com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)
 
 I also have this in main, before Application.launch is called:
 
  System.setProperty(prism.lcdtext, false);
 
 In .root in CSS I have:
 
-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;
 
 So all the fonts you see should be Arial (but the sizes and weights are
 tweaked depending on location).
 
 --John
 
 On 21/08/2013 20:51, Felipe Heidrich wrote:
 John H:
 
 In JFX we decided to go with sub-pixel positioned text (as opposite to
 pixel grid aligned).
 That said, on Windows for grayscale text, we are not doing that (yet). Are
 you running Windows, with D3D pipeline ?
 I would need to see a picture to be sure I understand the problem you
 describe.
 Felipe
 
 
 On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote

Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx

On 22/08/2013 21:24, Scott Palmer wrote:

I just tried turning off ClearType on Windows and found that the result was
pretty ugly.  I assume that with ClearType turned off, the results should
be comparable to what JavaFX is producing with grey-scale smoothing.
It depends on how you did it, if you turned it fully off it may not even 
do grayscale smoothing... also the default font in Windows is not 
suitable for this.  See below.


I noticed that the same web page rendered text differently between Chrome
and Firefox - Firefox seemed to have darker text. So even among native apps
you can get different results for the same font.


If you want to turn off cleartype in Windows 7, then just turning it off 
is not sufficient.  You need to replace the default font with Tahoma as 
well as the Windows 7 default font (Segoe UI) sucks without LCD 
smoothing.  I can recommend the cleartype switch program, see here: 
http://karpolan.com/software/cleartype-switch/


You'll want to keep smooth edges on, but cleartype off.



Scott


On Thu, Aug 22, 2013 at 3:21 PM, Phil Racephilip.r...@oracle.com  wrote:


John T,

Per a couple of earlier emails in this thread John H is deliberately
disabling LCD text
so has grey scale, hence you can't compare directly with a native app
since they all use LCD.

Any comparison has to be
1. Using the same string
2. Rendered in the same fashion : LCD or greyscale, hinted/unhinted.
3. Using the same font (face, size etc)
4. Using the same colours (fgbg) and watch out for the UI controls - they
used
to tweak your text colour so that (eg) black became dark grey, reducing
contrast
which reduced legibility, thus also invalidating any  test. I am not sure
if this is still the case,
but contrast is very important for text and you should make sure its as
high as possible.

-phil.




On 8/22/2013 11:35 AM, John C. Turnbull wrote:


Am I the only one who looks at that screenshot and thinks that the fonts
look really bad and obviously different from a native app?  Its not just
the Plot section, its all text on the screen.

This is what I am talking about.  I wouldn't even describe the
differences as subtle as to me there is a dramatic difference in quality.

Can this be fixed or are JavaFX apps always going to stand out for all
the wrong reasons like this?

On 23/08/2013, at 0:05, John Hendrikxhj...@xs4all.nl  wrote:

  Those are all normal controls, the plot section is just a Label for

example.

On 22/08/2013 13:39, John C. Turnbull wrote:


John H, it may be just me but pretty much *all* the fonts in your
screenshot
look quite poor and noticeably different from native font rendering.
  If you
look for instance at the text in the Plot section, to me that text
looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: 
openjfx-dev-bounces@openjdk.**java.netopenjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-bounces@**openjdk.java.netopenjfx-dev-boun...@openjdk.java.net]
On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how
the
glyph 2 is rendered on my system (it has a thick appearing curve
attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top
bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/**Digit2RenderedPoorlyInTopBar.**pnghttp://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this
stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
268,435,456 total   --
com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:134)
75 total resources being
managed

-- com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:153)
4 permanent resources
(5.3%)

-- com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:154)
2 resources locked
(2.7%)

-- com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:156)
43 resources contain interesting data
(57.3%) --
com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:158)
0 resources disappeared
(0.0%)

-- com.sun.prism.impl.**ManagedResource.printSummary(**
ManagedResource.java:160)

I also have this in main, before Application.launch is called:

   System.setProperty(prism.**lcdtext, false);

In .root in CSS I have:

 -fx-font-family: Arial;
 -fx-font-size: 16px;
 -fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are
tweaked depending on location).

--John

On 21/08/2013 20:51, Felipe Heidrich wrote:


John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to


pixel grid aligned

Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx

On 22/08/2013 17:38, Felipe Heidrich wrote:


John, for the sake of testing.

Could you enable LCD text for the plot Label in your app ?
Please let me know if that improves the position of each glyph (relative to one 
another).

You should also try your app using our previous text rasterizer, run with 
-Dprism.text=t2k
Is that better for you ?


Sure, I've created approximately the same shots with different settings 
for comparison:


prism.lcdtext=false
http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

prism.lcdtext=true
http://ukyo.xs4all.nl/LCDSmoothed.png

prism.lcdtext=true, prism.text=t2k
http://ukyo.xs4all.nl/LCDSmoothedT2K.png

prism.lcdtext=false, prism.text=t2k
http://ukyo.xs4all.nl/GrayscaleT2K.png

Now that I compared them all, the last one is how it was for the longest 
time.  Now I also noticed that in the last shot the font height is a 
pixel smaller, which is one the changes I couldn't put my finger on.


The LCD smoothed versions look quite good, but (as you can see in 
screenshot 2) it for same reason garbles my memory indicator when the 
background image is fading in.  After the fade-in completes, the text is 
correct (I screenshotted it just before the fade-in completes to show 
the garbled text).  This occurs with both the normal and t2k renderer 
when LCD text is on.


So, to make it clear:

1) Grayscale only: some glyphs look akward when bolded
2) Grayscale only + t2k: this is how I expected it to be (I tuned the 
look for that).  Apparently this default has changed(?).  The font in 
the top bar seems to be 1 pixel less high then in all the other version.
3) LCD only: Looks quite good on my normal LCD screens (better than 
Windows in my opinion, but perhaps the light-on-dark vs dark-on-light is 
the cause of that)

4) LCD only + t2k: Also looks good, I think (3) looks better though

3+4 fail when I drag the Window to my projector.  Colored fringes are 
visible.  This is probably a driver problem as Windows may not realize 
that my Projector is not using LCD (DLP projector).  I'm not sure how 
JavaFX figures this out, but I assume it asks Windows for this information.


--John




Regards,
Felipe



On Aug 22, 2013, at 7:05 AM, John Hendrikx wrote:


Those are all normal controls, the plot section is just a Label for example.

On 22/08/2013 13:39, John C. Turnbull wrote:

John H, it may be just me but pretty much *all* the fonts in your screenshot
look quite poor and noticeably different from native font rendering.  If you
look for instance at the text in the Plot section, to me that text looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how the
glyph 2 is rendered on my system (it has a thick appearing curve attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
268,435,456 total   --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being
managed

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources
(5.3%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:154)
2 resources locked
(2.7%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:156)
43 resources contain interesting data
(57.3%) --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:158)
0 resources disappeared
(0.0%)

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:160)

I also have this in main, before Application.launch is called:

  System.setProperty(prism.lcdtext, false);

In .root in CSS I have:

-fx-font-family: Arial;
-fx-font-size: 16px;
-fx-font-weight: normal;

So all the fonts you see should be Arial (but the sizes and weights are
tweaked depending on location).

--John

On 21/08/2013 20:51, Felipe Heidrich wrote:

John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to

pixel grid aligned).

That said, on Windows for grayscale text, we are not doing that (yet). Are

you running Windows, with D3D pipeline ?

I would need to see a picture to be sure I understand the problem you

describe.

Felipe


On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:


I think I also noticed a change in font rendering around b99

Re: Poor quality font rendering

2013-08-22 Thread Phil Race

On 8/22/2013 12:54 PM, John Hendrikx wrote:


3+4 fail when I drag the Window to my projector.  Colored fringes are 
visible.  This is probably a driver problem as Windows may not realize 
that my Projector is not using LCD (DLP projector).  I'm not sure how 
JavaFX figures this out, but I assume it asks Windows for this 
information.


If you do something like save an IE 10 or Windows notepad screenshot, 
and open it in Paint
and zoom in/out, does it do similar stuff ? Could be even worse for the 
projector case. Scaling an
image with LCD text doesn't work well, and especially badly if you scale 
up/down by some

unfriendly fraction.

-phil.



Re: Poor quality font rendering

2013-08-22 Thread Phil Race

On 8/22/2013 12:59 PM, John Hendrikx wrote:


If you want to turn off cleartype in Windows 7, then just turning it 
off is not sufficient.  You need to replace the default font with 
Tahoma as well as the Windows 7 default font (Segoe UI) sucks without 
LCD smoothing.  I can recommend the cleartype switch program, see 
here: http://karpolan.com/software/cleartype-switch/


You'll want to keep smooth edges on, but cleartype off.



Microsoft document Segoe UI quality as marginal in some non-LCD 
rendering modes,

although I think its better than I first remember from maybe Vista days.

-phil.


Re: Poor quality font rendering

2013-08-22 Thread John Hendrikx

On 22/08/2013 21:41, John C. Turnbull wrote:

Hi Phil,

I was actually aware that LCD text was disabled in this case but what I am 
saying is that I am seeing similar stark disparities between JavaFX fonts and 
native fonts even with LCD turned on.

I think the screenshot shows what I am talking about though perhaps the quality 
is poorer than my case because of the LCD issue.

The point is that there are still differences no matter what I do and to me at least 
these differences are very, very obvious.  I am trying to establish if what we have now 
is as good as it gets or if things are going to improve.

Also, it's clear from this thread that not everyone agrees on what looks good. 
It would seem that John H is concerned only with the weird '2' and feels that 
grayscale text is better than LCD text whereas I am more concerned with 
resembling native rendering.
I made new screenshots with different combinations of settings if you 
wish to compare those.  The strange 2 is what jumped out at me as 
something that changed recently, but on closer inspection I see many 
bolded glyphs that look poor in the original screenshot:


The 1 has a rather big top edge.  The H is thicker in one leg than 
the other.  The s has a thick right curve.  The / in top bar looks 
uneven.  The o, 0, 6, 9 and 5 glyphs hardly look bold at all.


I think the LCD smoothed versions looks quite good on my regular LCD 
monitor -- the problem is that it doesn't look good on the projector I'm 
using so I just turned it off for that.


Oh.. I forgot to say this, but...

Screenshots taken with LCD smoothing on are always gonna end up looking 
different on different monitors... if for example your monitor has 
slightly different spacing or a different order of the subpixels (or you 
rotated it), then the screenshot will look wierd.  I prefer to keep LCD 
smoothing off as I make screenshots / videos regularly and I donot know 
on what system they'll be viewed on.  So if one of shots has 
particularly bad colored fringes, it is likely you have a monitor that 
has a different configuration than mine.


--John



On 23/08/2013, at 5:21, Phil Racephilip.r...@oracle.com  wrote:


John T,

Per a couple of earlier emails in this thread John H is deliberately disabling 
LCD text
so has grey scale, hence you can't compare directly with a native app since 
they all use LCD.

Any comparison has to be
1. Using the same string
2. Rendered in the same fashion : LCD or greyscale, hinted/unhinted.
3. Using the same font (face, size etc)
4. Using the same colours (fgbg) and watch out for the UI controls - they used
to tweak your text colour so that (eg) black became dark grey, reducing contrast
which reduced legibility, thus also invalidating any  test. I am not sure if 
this is still the case,
but contrast is very important for text and you should make sure its as high as 
possible.

-phil.



On 8/22/2013 11:35 AM, John C. Turnbull wrote:

Am I the only one who looks at that screenshot and thinks that the fonts look 
really bad and obviously different from a native app?  Its not just the Plot 
section, its all text on the screen.

This is what I am talking about.  I wouldn't even describe the differences as 
subtle as to me there is a dramatic difference in quality.

Can this be fixed or are JavaFX apps always going to stand out for all the 
wrong reasons like this?

On 23/08/2013, at 0:05, John Hendrikxhj...@xs4all.nl  wrote:


Those are all normal controls, the plot section is just a Label for example.

On 22/08/2013 13:39, John C. Turnbull wrote:

John H, it may be just me but pretty much *all* the fonts in your screenshot
look quite poor and noticeably different from native font rendering.  If you
look for instance at the text in the Plot section, to me that text looks
awful.

Is that inside a WebView or some other control?

-jct

-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of John Hendrikx
Sent: Thursday, 22 August 2013 17:29
To: openjfx-dev@openjdk.java.net
Subject: Re: Poor quality font rendering


I took another good look, and I see what is bothering me is mostly how the
glyph 2 is rendered on my system (it has a thick appearing curve attached
to the base).  I've included a screenshot of my application that uses
several different sizes fonts, but it seems only the ones in the top bar are
rendered somewhat wierd.

http://ukyo.xs4all.nl/Digit2RenderedPoorlyInTopBar.png

I'm on Windows 7, JavaFX 8b99, 32-bit, using D3D pipeline (I get this stuff
in log in an infinite loop, so must be D3D I think):

D3D Vram Pool: 129,613,674 used (48.3%), 129,613,674 managed (48.3%),
268,435,456 total   --
com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:134)
75 total resources being
managed

-- com.sun.prism.impl.ManagedResource.printSummary(ManagedResource.java:153)
4 permanent resources
(5.3%)

-- com.sun.prism.impl.ManagedResource.printSummary

Re: Poor quality font rendering

2013-08-21 Thread John Hendrikx
I think I also noticed a change in font rendering around b99 
somewhere... the fonts seem to be thinner than before, or perhaps more 
poorly aligned with pixel boundaries.  I'd prefer glyphs laid out in the 
same way each time, ie. letters are always on a new pixel boundary, so 
the same letter will look the same regardless of what preceeds it.  I 
have LCD rendering turned off as I donot appreciate colored fringes on 
my glyphs.


On 21/08/2013 14:53, John C. Turnbull wrote:

I have only really tested JavaFX extensively on Windows so my comments here
apply mainly to that platform.



It seems that even with a font smoothing type of LCD, font rendering in
JavaFX is not at the same level of quality of native applications.  My
current experiences are with JavaFX 8 b103 and I find that all rendered text
in JavaFX appears of a significantly poorer quality than that which I would
see in Word for example or even in IE10 (which I believe uses the same text
rendering engine).  Also, these observations are based on text in standard
controls and the quality of font rendering is dramatically worse within the
Canvas control.



I am not an expert in font technology but I have read many times that the
levels of antialiasing for text that can be achieved in a GPU-based renderer
are always going to be less than that achieved in a CPU-based renderer.
This is often explained on the basis of graphics card drivers being
optimised for performance and the rapid rendering of triangles commonly
required in games rather than for rendering quality when it comes to text.



Is this the reason why JavaFX font rendering appears less legible and of a
lower quality than native apps?

If so, how does IE10 for example achieve a higher quality of rendering when
it seems to also use DirectWrite?

Is the quality of JavaFX font rendering ever going to improve?



Thanks,



-jct





Re: Poor quality font rendering

2013-08-21 Thread Felipe Heidrich

John H:

In JFX we decided to go with sub-pixel positioned text (as opposite to pixel 
grid aligned).

That said, on Windows for grayscale text, we are not doing that (yet). Are you 
running Windows, with D3D pipeline ?
I would need to see a picture to be sure I understand the problem you describe.

Felipe


On Aug 21, 2013, at 10:19 AM, John Hendrikx wrote:

 I think I also noticed a change in font rendering around b99 somewhere... the 
 fonts seem to be thinner than before, or perhaps more poorly aligned with 
 pixel boundaries.  I'd prefer glyphs laid out in the same way each time, ie. 
 letters are always on a new pixel boundary, so the same letter will look the 
 same regardless of what preceeds it.  I have LCD rendering turned off as I 
 donot appreciate colored fringes on my glyphs.
 
 On 21/08/2013 14:53, John C. Turnbull wrote:
 I have only really tested JavaFX extensively on Windows so my comments here
 apply mainly to that platform.
 
 
 
 It seems that even with a font smoothing type of LCD, font rendering in
 JavaFX is not at the same level of quality of native applications.  My
 current experiences are with JavaFX 8 b103 and I find that all rendered text
 in JavaFX appears of a significantly poorer quality than that which I would
 see in Word for example or even in IE10 (which I believe uses the same text
 rendering engine).  Also, these observations are based on text in standard
 controls and the quality of font rendering is dramatically worse within the
 Canvas control.
 
 
 
 I am not an expert in font technology but I have read many times that the
 levels of antialiasing for text that can be achieved in a GPU-based renderer
 are always going to be less than that achieved in a CPU-based renderer.
 This is often explained on the basis of graphics card drivers being
 optimised for performance and the rapid rendering of triangles commonly
 required in games rather than for rendering quality when it comes to text.
 
 
 
 Is this the reason why JavaFX font rendering appears less legible and of a
 lower quality than native apps?
 
 If so, how does IE10 for example achieve a higher quality of rendering when
 it seems to also use DirectWrite?
 
 Is the quality of JavaFX font rendering ever going to improve?
 
 
 
 Thanks,
 
 
 
 -jct