[webkit-dev] When the webkit can't find a font.

Jushin cocorub at gmail.com
Sat Oct 27 21:48:25 PDT 2007


I was thinking that when webkit can't find fonts specified in the webpage,
then it will render page with the font that I specified in the preference.Is
it right?
However, I found this is not true.
If a website doesn't specify fonts for website,the webkit use the font in
the preference,
but a website specify fonts but they are not in the system, then the webkit
just render pages with serif font even though I chose sans-serif font in the
preference.
Would this be a bug of webkit?
Here is the sample webpage I tested.

<html>
<meta http-equiv='Content-type' content='text/html; charset=utf-8'>
<style TYPE="text/css" MEDIA=screen>
<!--
p.nonexist {
font-family: non-exist-font;
}
p.exist {
font-family: Helvetica;
}
-->
</style>
<head>
<title>test</title>
</head>
<body>
<p class="nonexist">font not available</p>
<p class="exist">font available</p>
font not specified
</body>
</html>

As you can see, if a font doesn't exist in the system, I get serif.
If a font exist (helvetica), then the webkit render the text with the font.
Lastly, if no font is specified, then the webkit just use the font in the
preference.

Jusin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20071028/5b410da7/attachment.html


More information about the webkit-dev mailing list