Install Chinese fonts for jre in Ubuntu 9.10

Source: Internet
Author: User
Article Source: http://www.linuxidc.com/Linux/2010-01/23990.htm

 

Installation environment
Ubuntu 9.10, Java 1.6.0.15

First, find the font you need.
C:/Windows/fonts. I copied only simhei. TTF and simsun. TTC.

 

After installing Java, you can see many fonts in the installation directory/usr/lib/JVM/Java-6-sun/JRE/lib/fonts/of Java. Create a directory here, the name is fallback (use this name. It is said that Ubuntu cannot find the set font.
Find the font in the directory) and copy the font you need to the directory.
$ Mkdir fallback
$ Sudo CP./your font DIR/simhei. TTF fallback/
$ Sudo CP./your font DIR/simsun. TTC fallback/

 

Next, we should note that many documents do not describe this point, that is, the permission of the font file must be readable! I did not pay attention here.
After several days, I finally found out.
$ CD fallback/
$ Sudo chmod 644 simhei. TTF
$ Sudo chmod 644 simsun. TTC

Then, run the following command in the fallback directory:
$ Mkfontscale & mkfontdir
In this case, the fonts. dir and fonts. Scale files are generated under the fallback directory, and the fonts. Scale contents are appended to the fonts. dir in the parent directory,
$ Su
$ Cat fonts. scale>.../fonts. dir

This should be done. If not, the FC-Cache refresh the font cache.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.