WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
14736
Safari implementation of text-shadow off by 1px
https://bugs.webkit.org/show_bug.cgi?id=14736
Summary
Safari implementation of text-shadow off by 1px
David Storey
Reported
2007-07-23 15:00:46 PDT
This issue is causing us problems now we (Opera) support text-shadow. It will likely cause iCab and KHTML similar problems. Text with text shadow on this page and others that use an offset of 2px 2px displays like double text in Opera. Our analysis is as follows: "1. Safari always uses antialiased text, where Opera on my laptop uses no antialiasing, but has a very thin (1px) font line. This means Safari blurs the shadow too as part of the antialias, making it rest against the text, where Opera shows it separate. Gogi antialiases as well. "2. They (the site) ask for a 2px 2px offset, which Opera dutifully does. Safari uses 1px 1px, so there is no gap between the text and the shadow, where there is in Opera. "safari has a weird formula for shadow offset: offset = ( offset/abs(offset) ) * ( abs(offset)-1 ) so: 3 -> 2 2 -> 1 1 -> 0 0 -> 0 -1 -> 0 -2 -> 1 -3 -> 2 due to the 1px error in Safari, fixing this issue for Opera (and to render as the author intends it to look) and making the offset 1px 1px would make the shadow disappear in Safari. With the current implementation one can either make it look correct in Opera and broken in Safari or work correctly in Safari and broken in Opera. any chance of getting this 1px error fixed in Safari 3?
Attachments
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2007-07-23 15:10:37 PDT
(In reply to
comment #0
)
> "safari has a weird formula for shadow offset: > offset = ( offset/abs(offset) ) * ( abs(offset)-1 )
Is that from WebKit source code? See also
bug 12943
.
David Storey
Comment 2
2007-07-23 15:26:53 PDT
It is from our QA analysis. I'm not sure if they got it from the source, but I'd guess from testing the issue. I can check with them if needed however.
David Storey
Comment 3
2007-07-24 02:20:05 PDT
The analysis was pseudo-code to describe the issue, not the actual source. It may not be 100% correct but it is the gist of the problem
mitz
Comment 4
2007-07-24 02:47:33 PDT
(In reply to
comment #3
)
> The analysis was pseudo-code to describe the issue, not the actual source. It > may not be 100% correct but it is the gist of the problem
Thanks for clarifying that. I suspect that like
bug 12943
, this behavior stems from an issue with the Core Graphics framework in Tiger. If that is the case and the analysis is sound, perhaps a workaround could be implemented based on it.
Pascal
Comment 5
2007-11-13 15:00:11 PST
Just to note, this Bug is also present in Leopard 10.5 and therefore affects not only Safari but all WebKit-using Applictions... and gives me a headache as a Widget developer...
mitz
Comment 6
2007-12-14 11:38:54 PST
Fixed in <
http://trac.webkit.org/projects/webkit/changeset/28714
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug