Install Arial and Microsoft Black fonts under Linux

Source: Internet
Author: User
Recently working with the itext generated PDF in the Windows environment does not appear in Chinese garbled, and in the Linux language garbled, open PDF View PDF encoding, as well as the encoding displayed, found that the encoding does not correspond. The reason is that the use of the Arial and Microsoft Jas is not installed in the Linux environment. WORKAROUND: 1. Copy the required fonts to Linux under the Windows environment. (SIMSUN.TTC (Arial), Msyf.ttf (Microsoft Ya Black)) 2. Create a directory under the Linux environment Mkdir-pv/usr/share/fonts/chinese/truetype the font into the directory cd/usr/share/fonts/chinese/truetypechmod 755 * Give the font permission to execute 3. Build Font Cache # Mkfontscale (if prompted Mkfontscale:command not found, install it yourself # yum install mkfontscale) # mkfontdir# Fc-cach E-FV (if prompted Fc-cache:command not found, you need to install the # yum install fontconfig) 4.reboot reboot system

Install Arial and Microsoft Black fonts under Linux

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.