RESOLVED FIXED 17194
REGRESSION (2.0.4-3.0): Changing text to bold changes font family
https://bugs.webkit.org/show_bug.cgi?id=17194
Summary REGRESSION (2.0.4-3.0): Changing text to bold changes font family
Adriaan Tijsseling
Reported 2008-02-06 05:08:44 PST
Using the WebKit sample, Blot, included with developer tools, load a file with the following HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Untitled</title> <style type="text/css"> /*<![CDATA[*/ <!-- body, div, p { margin: 3px 6px 3px 6px; padding: 0; font: 13px "LucidaGrande"; background: #ffffff; color: #333333; text-align: justify; } --> /*]]>*/ </style> </head> <body> <p>Making this word bold will turn it into Times on 10.5.</p> </body> </html> Select a word to turn it bold and it will use the Times font. This does not happen on 10.4 with the publick Safari 3 installed there, only on 10.5.
Attachments
Use the family of the font whose name matches the desired family (32.61 KB, patch)
2008-02-06 13:18 PST, mitz
darin: review+
Screenshot of test case in Safari 2.0.4 (5.07 KB, image/png)
2008-02-07 09:20 PST, David Kilzer (:ddkilzer)
no flags
mitz
Comment 1 2008-02-06 08:27:35 PST
I think the problem is that when you specify "LucidaGrande" rather than "Lucida Grande", WebKit fails to find a font family with that name and therefore falls back on finding a font with the PostScript name LucidaGrande. That works for the regular weight but when you ask for the bold weight, since you did not specify the correct family name, WebKit fails to match Lucida Grande Bold with "LucidaGrande".
mitz
Comment 2 2008-02-06 13:18:51 PST
Created attachment 18967 [details] Use the family of the font whose name matches the desired family
Adriaan Tijsseling
Comment 3 2008-02-06 15:45:11 PST
Indeed, using font family names fixes the issue. Thanks for the pointer!
mitz
Comment 4 2008-02-06 16:05:09 PST
I would still like the patch to be considered.
Darin Adler
Comment 5 2008-02-06 16:52:09 PST
Comment on attachment 18967 [details] Use the family of the font whose name matches the desired family r=me
mitz
Comment 6 2008-02-07 09:01:45 PST
David Kilzer (:ddkilzer)
Comment 7 2008-02-07 09:18:23 PST
This was a regression from Safari 2.0.4 (419.3) with original WebKit on Mac OS X 10.4.11 (8S165). The font family did NOT change when the text became bold in Safari 2.0.4.
David Kilzer (:ddkilzer)
Comment 8 2008-02-07 09:20:03 PST
Created attachment 18984 [details] Screenshot of test case in Safari 2.0.4
Note You need to log in before you can comment on or make changes to this bug.