MathCurvesSurfacesWallpaper GroupsGallerySoftwarePOV-Ray
ProgramingLinuxPerl PythonHTMLCSSJavaScriptPHPJavaEmacsUnicode ♥
Web Hosting by 1&1

Displaying Chinese on Ubuntu Linux Firefox Results Ugly Mixed Font

Xah Lee,

Linux dekstop always has a bunch of glitches and minor issues.

When displaying Chinese characters, it uses mixed font, resulting ugly text. Here's how it shows in Ubuntu Linux (everything by default)

chinese char in linux firefox
Chinese characters in Linux. Note the motley fontfaces.
chinese char in Windows firefox
Chinese characters in Windows

Test Your Browser

Here's the code you can test with your browser:

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>test</title>
</head>
<body>

<h1>test 1 <span>李杀网</span></h1>

<h1>test 2 <span lang="zh">李杀网</span></h1>

</body>
</html>
chinese char in Windows firefox 2
Chinese shown in Ubuntu Linux, as of .

See for yourself here: test page: display chinese on web.

As of , Google Chrome, Opera, IE9, will show both lines fine. Firefox Windows will only show the second line fine. Safari screws both lines. (all on Windows)

Google Chrome on Linux also displays both lines fine.

Tip for Displaying Multiple Languages in Browser

If your page is primarily in one specific language other than English, you should specify the lang using “meta” tag, like this:

<meta http-equiv="content-language" content="zh">

When displaying multiple languages in a page, you can specify a language on a run of text with the “lang=…” attribute, like this. This will help browser choose the right font.

<span lang="zh">…</span>

This is useful for example for bilingual pages, or pages discussing linguistics.

blog comments powered by Disqus