Created attachment 163268 [details]
Screenshot of Facebook FQL sample code, when logged in as a Chinese user
Safari version: 6.0
OS X Version: 10.8.1
When a <pre> or <code> has lang attribute set to zh, zh-tw or zh-cn, or is inside an element with such lang attribute, then the texts are not in monospace font.
Code to reproduce:
<pre lang='zh-tw'>hello world</pre>
"hello world" should be in monospaced font.
"hello world" are in sans-serif font.
When logged in a Facebook account with user language set to Chinese (Traditional), the code examples are not in monospace font, but in Heiti TC.
I think this is because Safari now chooses font by the lang attribute, and in Mac OS X, monospace font of zh, zh-tw and zh-cn are the same as sans-serif font, described in DefaultFontFallback.plist (under /System/Library/Frameworks/CoreText.framework/Versions/A/Resources)
Firefox also has this issue. Not sure if Chinese (and other CJK) OS X fonts even have monospace Roman characters.
Hi, this bug seems also affecting <samp> element's render behavor in WinCE port.
since <samp>'s default html.css setting is "font-family: monospace", its font-size should be displayed smaller, but not.
My problem resolved.