Page MenuHomePhabricator

SVG with CJK fonts doesn't render CJK text
Closed, ResolvedPublic

Description

Author: brianna.laugher

Description:
Hello,

It appears that SVGs with CJK (Chinese, Japanese, Korean) text are not being
rendered correctly. I couldn't find a single SVG that rendered correctly. These
ones, for example, don't render correctly:

http://commons.wikimedia.org/wiki/Image:Fonts_%28ja%29.svg
http://commons.wikimedia.org/wiki/Image:MechatronicsDiagram_%28ja%29.svg
http://commons.wikimedia.org/wiki/Image:Solar_eclipse_%28ja%29.svg
http://commons.wikimedia.org/wiki/Image:Ant_worker_morphology_%28ja%29.svg
http://commons.wikimedia.org/wiki/Image:Male_reproductive_system_zh-tw.svg

The few that I could find that did render correctly (
http://commons.wikimedia.org/wiki/Image:Chromosome_zh.svg ) had had the text
converted to paths, which is rather undesirable.

For Korean fonts, a user suggested one of these:
http://packages.debian.org/unstable/x11/ttf-unfonts
http://kldp.net/projects/unfonts/

Firefox 1.5.0.8 also failed to render these images correctly, but I was able to
see the CJK text by downloading the files and using EyeOfGNOME (eog) to view them.


Version: unspecified
Severity: normal
OS: Linux
Platform: PC
URL: http://commons.wikimedia.org/wiki/Image:Public_key_making-ko.svg

Details

Reference
bz8666

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:31 PM
bzimport set Reference to bz8666.
bzimport added a subscriber: Unknown Object (MLST).

kjoonlee wrote:

Could this be related to bug 5694?

ayg wrote:

Isn't the issue just that the WMF doesn't have a decent set of fonts installed? I could've sworn
there was a bug for that.

brianna.laugher wrote:

(In reply to comment #4)

Isn't the issue just that the WMF doesn't have a decent set of fonts

installed? I could've sworn

there was a bug for that.

[Bugzilla:3769]]: "Fonts are off in rasterized SVG images on wikimedia sites" ?
If that's the one you mean, it needs a better name. The fonts are not off; they
don't exist.

I have installed the fonts-chinese, fonts-japanese and fonts-korean packages
from FC4, plus others for other languages. This closes the issue for now as far
as I'm concerned. For Japanese text the most common fallback is the Kochi Gothic
substitute from http://sourceforge.jp/projects/efont , which is now being used
for all fonts on http://commons.wikimedia.org/wiki/Image:Fonts_(ja).svg except
"serif". With a bit of effort you can get it to use the Kochi Mincho substitute
font, e.g.

http://noc.wikimedia.org/~tstarling/svg/Fonts_ja_linux.png

which is from

http://noc.wikimedia.org/~tstarling/svg/Fonts_ja_linux.svg

Use action=purge on the image description page, plus a hard refresh or two, to
get the SVGs to re-render.