Asian fonts on Linux

1,920 views
Skip to first unread message

Paweł Hajdan, Jr.

unread,
Mar 22, 2011, 5:09:20 AM3/22/11
to chromium-dev
I'd need some help with an issue reported by Gentoo Linux users: http://bugs.gentoo.org/show_bug.cgi?id=359153 . It seems that additional fonts are needed for a Chromium build to render the Asian characters on http://soc16ps.car.coocan.jp/kurumaya/kuru032.html, but Firefox 3.6.15 on the same system displays the page just fine.

I'm not really familiar with how fonts work on Linux or how we display them differently from Firefox - do you have some suggestions what to do? I can get any additional information if you need it, the issue reproduces on my system.

Evan Martin

unread,
Mar 22, 2011, 12:31:51 PM3/22/11
to phajd...@chromium.org, chromium-dev
Comment #5 on that bug is correct -- we don't support bitmap fonts.
(Note that we do support rendering scalable fonts without
antialiasing, which can make debugging this a bit confusing as they
look like bitmap fonts when they're rendered.)

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>

Paweł Hajdan, Jr.

unread,
Mar 28, 2011, 3:37:24 PM3/28/11
to Evan Martin, chromium-dev
Okay, that explains it to some degree. However, I wonder how Google Chrome Linux packages solve this issue. Do they depend on some additional font packages? Does Ubuntu install some more fonts by default?

James Su

unread,
Mar 28, 2011, 3:46:10 PM3/28/11
to phajd...@chromium.org, Evan Martin, chromium-dev
Ubuntu has some ttf asian fonts, such as:

Japanese: ttf-takao-mincho, ttf-takao-gothic
Chinese: ttf-wqy-zenhei, ttf-arphic-uming, ttf-arphic-ukai
Korean: ttf-unfonts-extra, ttf-alee

Evan Martin

unread,
Mar 29, 2011, 6:08:31 AM3/29/11
to Paweł Hajdan, Jr., chromium-dev
I believe Ubuntu installs more fonts by default, but I haven't
checked. (At this point bitmap fonts are only used by people who use
"old" terminals like xterm/rxvt; out of the box most systems don't
even expose bitmap fonts to fontconfig anymore. See e.g.
http://www.technovelty.org/linux/tips/gnometerminal-font.html for
someone documenting how to undo this on Debian.)

On Mon, Mar 28, 2011 at 9:37 PM, Paweł Hajdan, Jr.

Paweł Hajdan, Jr.

unread,
Mar 29, 2011, 12:06:43 PM3/29/11
to James Su, Evan Martin, chromium-dev
On Mon, Mar 28, 2011 at 21:46, James Su <su...@chromium.org> wrote:
Ubuntu has some ttf asian fonts, such as:

Japanese: ttf-takao-mincho, ttf-takao-gothic
Chinese: ttf-wqy-zenhei, ttf-arphic-uming, ttf-arphic-ukai
Korean: ttf-unfonts-extra, ttf-alee

Thank you, that was useful. For example, the Korean fonts don't fully work for http://soc16ps.car.coocan.jp/kurumaya/kuru032.html (some characters are still displayed as "unknown"), but the Japanese and Chinese ones seem to work fine.

Does it mean we should have at least one Japanese font, at least one Chinese font, and at least one Korean font to be able to display all pages using CJK characters correctly? Do you know where I can find more info about that?

Evan Martin

unread,
Mar 29, 2011, 12:33:13 PM3/29/11
to Paweł Hajdan, Jr., James Su, chromium-dev
On Tue, Mar 29, 2011 at 6:06 PM, Paweł Hajdan, Jr.
<phajd...@chromium.org> wrote:
> Thank you, that was useful. For example, the Korean fonts don't fully work
> for http://soc16ps.car.coocan.jp/kurumaya/kuru032.html (some characters are
> still displayed as "unknown"), but the Japanese and Chinese ones seem to
> work fine.

That page looks like it's just Japanese (with Chinese characters).
Maybe you pasted the wrong link?

> Does it mean we should have at least one Japanese font, at least one Chinese
> font, and at least one Korean font to be able to display all pages using CJK
> characters correctly? Do you know where I can find more info about that?

Fundamentally, to display all characters correctly you need at least
one font that contains each character you want to display. Like if
you wanted to display Thai you'll need Thai fonts too. It might be
that having Arial Unicode installed would cover everything without
needing any additional fonts (though that font isn't freely
available). If you're trying to come up with a comprehensive set,
perhaps this is a good place to start:

Evan Martin

unread,
Mar 29, 2011, 12:36:03 PM3/29/11
to Paweł Hajdan, Jr., James Su, chromium-dev

(sorry, misfire on the send button)
http://packages.ubuntu.com/maverick/ubuntustudio-desktop
and search for "ttf"

Takayoshi Kochi

unread,
Mar 30, 2011, 7:14:47 PM3/30/11
to phajd...@chromium.org, James Su, Evan Martin, chromium-dev
Hi,

(speaking as a native Japanese)

As Evan already mentioned, Chromium only renders text with scalable fonts,
and it seems the bug reporter's machine only had bitmap fonts for Japanese.
(so firefox barely renders text, which is better than nothing, but not a ideal result
for native readers).

The page itself is describing information about Subaru Legacy (a car) spec in Japanese.

Korean fonts usually don't have glyphs for Japanese codepoints, but Chinese and Japanese
share some (many) codepoints, which explains what you observed.

If you want properly display Japanese page without the 'boxes', you need proper Japanese
font, Korean or Chinese fonts would not suffice.

Please do not treat 'CJK' as one thing, they are separate languages with separate character sets.
So does fonts.

So yes, to be able to display all pages of C, J, K, you need at least one scalable font for each
(and probably for better presentation, you need some variants for each, e.g. serif/sans-serif/monospace).

Decent quality fonts for C, J, K may not be freely available (the ones James wrote are free, which
ubuntu uses).
And you may also need some good configuration for fontconfig to *properly* pick the appropriate font.

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev



--
Takayoshi Kochi
Reply all
Reply to author
Forward
0 new messages