

First, note that font preferences are configured per script, and this includes the choice of whether the default content font is 'serif' or 'sans-serif' see, for example, -western (which is 'serif' by default) vs -CN (which is 'sans-serif' by default).
Css inherit font code#
Here's roughly what seems to be happening (based on observed behavior, I didn't try to track all this through the font-matching code yet.) I think the bug here is that font-family is being inherited as "used", when it should inherit as "computed". It's a fairly minor problem.the obvious workaround is to request a font that has the necessary characters.but it cost us considerable time to figure out why two documents looked different. In different files, you can see a difference with and without a CSS rule that requests the body font for language zh-CN. In the same file, you can get a different font on the first block if it has a class and style rule that request Times New Roman, and another style rule requests that for the body. This can also be reproduced with CSS rules. Internet Explorer and MS Edge both use the same font for each, though I'm not sure which.looks more like SimSun.


I'm not sure what the best font to choose is, but I certainly expected the same one to be chosen for identical blocks of text in the same language when both styles resolve to the same requested font.Ĭhrome uses Microsoft Yahei for both. (On my system FF chooses Microsoft YaHei for the top block and SimSun for the bottom one.) The two identical blocks of Chinese are displayed in different fonts. Open a file containing the following text:
