Bug 69609 - 'optimiseLegibility' text rendering issue OSX
Summary: 'optimiseLegibility' text rendering issue OSX
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 02:18 PDT by vernnobile
Modified: 2011-10-09 16:57 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vernnobile 2011-10-07 02:18:35 PDT
When using 'text-rendering:optimiseLegibility' with OSX(10.6.8), Safari (5.1) and Chrome (14.0) to render truetype fonts, the letter spacing of text is rendered inferior than with 'text-rendering:optimiseLegibility' toggled off. Presumably WebCore is imposing it's own hinting(?) onto the OSX text rendering?  The result imo is inferior text letter spacing.
Comment 1 Alexey Proskuryakov 2011-10-07 10:01:54 PDT
Do you have a test case for this that you could link to, or ideally attach to this bug?
Comment 2 vernnobile 2011-10-07 12:00:58 PDT
please see http://code.newtypography.co.uk/?p=1320
for explanation and screenshots.

(In reply to comment #1)
> Do you have a test case for this that you could link to, or ideally attach to this bug?
Comment 3 Alexey Proskuryakov 2011-10-07 12:54:20 PDT
This doesn't help much. To investigate this issue, we need to know exactly what font you are using, with which size, page background, whether there are plug-ins on the page, and more.

The best way to communicate such information is by providing a complete test case.

Also, I'm assuming that your test actually uses "optimizeLegibility", not "optimiseLegibility".
Comment 4 vernnobile 2011-10-07 21:21:42 PDT
ok will provide a complete test case. The css in my test pages is "optimizeLegibility".

(In reply to comment #3)
> This doesn't help much. To investigate this issue, we need to know exactly what font you are using, with which size, page background, whether there are plug-ins on the page, and more.
> 
> The best way to communicate such information is by providing a complete test case.
> 
> Also, I'm assuming that your test actually uses "optimizeLegibility", not "optimiseLegibility".
Comment 5 vernnobile 2011-10-08 13:27:01 PDT
I have put a test page at http://newtypography.co.uk/fonttests/renderfonttest.html
If you need more please let me know specifics.

(In reply to comment #3)
> This doesn't help much. To investigate this issue, we need to know exactly what font you are using, with which size, page background, whether there are plug-ins on the page, and more.
> 
> The best way to communicate such information is by providing a complete test case.
> 
> Also, I'm assuming that your test actually uses "optimizeLegibility", not "optimiseLegibility".
Comment 6 mitz 2011-10-08 14:28:45 PDT
I believe that this was fixed in <http://trac.webkit.org/r95070>. Can you please test with a WebKit nightly build of a r95070 or later? Thanks!
Comment 7 vernnobile 2011-10-08 14:45:16 PDT
No this is not the same issue :)

It looks as if Webkit on OSX is adjusting the spacing between letters of rendered text. These adjustments are creating inferior letter spacing on webfonts. On Linux Chrome & ChromeOS the spaciong adjustments seem to be made between words, not letters. This makes sense. OSX implementation seem to be wrong.

(In reply to comment #6)
> I believe that this was fixed in <http://trac.webkit.org/r95070>. Can you please test with a WebKit nightly build of a r95070 or later? Thanks!
Comment 8 mitz 2011-10-08 15:12:32 PDT
(In reply to comment #7)
> No this is not the same issue :)

I see a significant difference between how glyphs in your test case are spaced in Safari 5.1 and how they’re spaced in the latest WebKit nightly build. Are you not?
Comment 9 Philippe Wittenbergh 2011-10-08 18:48:06 PDT
Note that Gecko on OS X has 'optimizeLegibility' turned ON by default (and you can't turn it off). On the other hand, Opera doesn't support that property, so far.

See https://developer.mozilla.org/en/CSS/text-rendering for a description of the property. Is there a similar Apple doc ? I may have missed it…

That being said, 
* I see a slight difference - improved (!) rendering – on the latest Webkit compared to Safari 5.1
* I see virtually no difference between the latest WebKit and Fx 7 and Gecko nightly builds. The spacing between words is slightly looser on Gecko – it looks like Webkit tightens the white-space slightly whereas Gecko does not.

* the Coda font has a weird behaviour in WebKit - the spacing is looser with 'optimizeLegibility' than without. I would expect the opposite. The text run without optimisation on WebKit looks the same as Gecko (which has optimisation ON by default)

Tested on 10.6.8 - took some screenshots and overlayed them in Photoshop.
Comment 10 vernnobile 2011-10-08 23:26:06 PDT
Many thanks. 
Under latest nightly builds of Webkit and Google Canary, the issue is now fixed :) text rendering is now optimised, and comparable to Gecko.

Re: Coda font. this font has no kerning pairs for lowercase characters. Hence why it's letter spacing doesn't tighten under 'optimizeLegibility'. However, does optimizeLegibility apply any auto-hinting or that would explain the looser (but better?) spacing under optimizeLegibility?

(In reply to comment #9)
> Note that Gecko on OS X has 'optimizeLegibility' turned ON by default (and you can't turn it off). On the other hand, Opera doesn't support that property, so far.
> 
> See https://developer.mozilla.org/en/CSS/text-rendering for a description of the property. Is there a similar Apple doc ? I may have missed it…
> 
> That being said, 
> * I see a slight difference - improved (!) rendering – on the latest Webkit compared to Safari 5.1
> * I see virtually no difference between the latest WebKit and Fx 7 and Gecko nightly builds. The spacing between words is slightly looser on Gecko – it looks like Webkit tightens the white-space slightly whereas Gecko does not.
> 
> * the Coda font has a weird behaviour in WebKit - the spacing is looser with 'optimizeLegibility' than without. I would expect the opposite. The text run without optimisation on WebKit looks the same as Gecko (which has optimisation ON by default)
> 
> Tested on 10.6.8 - took some screenshots and overlayed them in Photoshop.
Comment 11 Alexey Proskuryakov 2011-10-09 16:57:14 PDT
Marking WORKSFORME per this comment. Thank you for testing!

Please send questions about WebKit behavior to webkit-help mailing list: http://www.webkit.org/contact.html