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.
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".
Created attachment 18967 [details] Use the family of the font whose name matches the desired family
Indeed, using font family names fixes the issue. Thanks for the pointer!
I would still like the patch to be considered.
Comment on attachment 18967 [details] Use the family of the font whose name matches the desired family r=me
Fixed in <http://trac.webkit.org/projects/webkit/changeset/30066>.
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.
Created attachment 18984 [details] Screenshot of test case in Safari 2.0.4