RESOLVED WORKSFORME69609
'optimiseLegibility' text rendering issue OSX
https://bugs.webkit.org/show_bug.cgi?id=69609
Summary 'optimiseLegibility' text rendering issue OSX
vernnobile
Reported 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.
Attachments
Alexey Proskuryakov
Comment 1 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?
vernnobile
Comment 2 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?
Alexey Proskuryakov
Comment 3 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".
vernnobile
Comment 4 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".
vernnobile
Comment 5 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".
mitz
Comment 6 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!
vernnobile
Comment 7 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!
mitz
Comment 8 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?
Philippe Wittenbergh
Comment 9 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.
vernnobile
Comment 10 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.
Alexey Proskuryakov
Comment 11 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
Note You need to log in before you can comment on or make changes to this bug.