If you’re dissatisfied with the ghastly appearance of Japanese text in a stock install of Ubuntu, this guide might help. You’ll end up with unhinted, sub-pixel anti-aliased fonts like those used in OS X.
If you are in the camp that believes OS X’s fonts to be ‘blurry’ or ‘hard to read’, I can’t help you. However, if you like OS X’s font rendering, read on!
In the following, > indicates a line to be typed in the terminal. Some long lines are split over two or more lines below, with continuation lines being indented. Type it all as a single line in the terminal.
These instructions have been tried on Ubuntu 5.04 (Hoary); I’d especially appreciate feedback on whether it works in 5.10 (Breezy).
Getting the fonts
First, you need to get some decent Japanese fonts: the Kochi ones supplied with Ubuntu are horrible. You can get some good ones from Windows. I won’t address the legal issues—frankly, I don’t care—but if your computer came with Windows 2000 or XP, it shouldn’t be a problem.
Some of this needs to be done in a terminal:
> sudo apt-get install cabextract > sudo mkdir -p /usr/local/share/fonts/truetype
Insert a Windows 2000 or XP installation CD. If your CD/DVD drive is not mounted at /media/cdrom, you’ll have to change that in the lines below, but I think it will almost always be the case.
> cd /usr/local/share/fonts/truetype > find /media/cdrom/ | grep -Ei 'MS(MINCHO|GOTHIC).TT_' | sudo xargs cabextract
Alternatively—if you don’t have a CD drive for example—you can just copy the files from an existing Windows installation: in that case, find
MSMINCHO.TTC in Windows’ font directory and manually copy them to
> sudo cp /source/location/* /usr/local/share/fonts/truetype/
Whichever choice you made, now check that you see both
msmincho.ttc (the capitalisation shouldn’t matter):
> ls /usr/local/share/fonts/truetype
I also suggest that you install the Microsoft Core Fonts as described in the unofficial Ubuntu Guide.
Now we can set the fonts that will be used automatically for each script. The system checks each font in turn to find the glyphs it needs.
> cd /etc/fonts > cp local.conf local.conf.default > sudo gedit local.conf
Replace the contents of local.conf with my version.
Save and exit.
> sudo fc-cache -f -v /usr/local/share/fonts
Go to the system menu at the top of the screen, System, then Font.
Under Font Rendering, click on “Details…”.
Set Smoothing to “Subpixel (LCDs)”.
Set Hinting to “None”.
You can choose some different fonts for the system, if you prefer. I use Arial 10, Arial 10, Arial 10 Bold, Monospace 9.
Click Close again.
I haven’t covered KDE here; if you have any KDE apps, you can configure their fonts using
kcontrol in a similar way to Gnome, and choosing the same settings.
You can either restart the computer or just X11 (make sure that you’ve saved everything and hit Alt+Backspace).
Go to a Japanese website in Firefox, and see if the kanji and kana are now more normal shapes. Check the title bar of the browser as well. Please give feedback below!
2005-11-29 17:49 UTC. Comments: 4.