Poor quality font rendering
Scott Palmer
swpalmer at gmail.com
Thu Aug 22 12:24:56 PDT 2013
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.
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.
Scott
On Thu, Aug 22, 2013 at 3:21 PM, Phil Race <philip.race at 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 (fg&bg) 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 <hjohn at 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 at openjdk.**java.net<openjfx-dev-bounces at openjdk.java.net>
>>>> [mailto:openjfx-dev-bounces@**openjdk.java.net<openjfx-dev-bounces at openjdk.java.net>]
>>>> On Behalf Of John Hendrikx
>>>> Sent: Thursday, 22 August 2013 17:29
>>>> To: openjfx-dev at 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<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
>>>>>>>
>>>>>>
>
More information about the openjfx-dev
mailing list