How to install fonts on a Linux system

Source: Internet
Author: User

How to install fonts on a Linux system last updated December 11, 2015Category Linux 101 latest article label font Linux fonts

Most of the fonts used by computer users belong to TrueType fonts, and the extension of TrueType font files is. TTF,TTF is the acronym for TrueType fonts. This tutorial will show readers how to install TrueType fonts on Linux systems. This article first describes the general installation method, regardless of which Linux distribution you are using, you can install it in this way. Then introduce some shortcuts or special methods for installing fonts in the Debian department and the Redhat system release.

Common methods for installing TrueType fonts

Ubuntu fonts Family (Ubuntu font Family) is a collection of open source fonts developed by canonical company in 2010-2011 years, including Ubuntu Light, Ubuntu Regular, Ubuntu Medium, Ubuntu Bold, Ubuntu mono and other fonts. Ubuntu font is still very beautiful, the font of the general graphical interface I like to use Ubuntu Regular, and the terminal uses Ubuntu Mono. Now I'm using Ubuntu fonts as an example to introduce a common approach to installing TrueType fonts on Linux systems.

Ubuntu font Family: http://font.ubuntu.com/This is an English web page, children's shoes that are not used to watching English can be downloaded directly by clicking this link. Terminal control can open terminal input below to download the command.

wget Http://font.ubuntu.com/download/ubuntu-font-family-0.80.zip

After downloading, use the unzip command in the terminal to extract the downloaded font files.

Unzip Ubuntu-font-family-0.80.zip

Unzip will store the extracted files in a new directory by default, which is ubuntu-font-family-0.80. Now use the CP command to copy all the new directories and font files under the directory to the/usr/share/fonts/truetype directory. The command is as follows:

sudo cp-r ubuntu-font-family-0.80//usr/share/fonts/truetype/

The/usr/share/fonts/directory and its subdirectories require root permission to write, so the above command is preceded by sudo. After this command is executed, the ubuntu-font-family-0.80 directory is copied to the/usr/share/fonts/truetype directory and becomes a subdirectory of the/usr/share/fonts/truetype. The-r option of the command represents recursive, which is recursive replication, so all font files in the original ubuntu-font-family-0.80 directory will be copied to/usr/share/fonts/truetype/ The ubuntu-font-family-0.80 directory.

After the copy is complete, the newly installed Ubuntu font family can only be used by the root user, and we need to change the font permissions so that other users can use it. Enter the following command.

sudo chmod 755/usr/share/fonts/truetype/ubuntu-font-family-0.80/-R

Then enter the following command to refresh the system font information file.

Fc-cache-f-V

If you use LibreOffice writer, then you just need to restart LibreOffice writer to use the new Ubuntu font.

Restrict the current user to use new fonts only

We copy the font files to the/usr/share/fonts/directory, and all users on the system can use the newly installed fonts. But if you only want to make it available to the current logged-in user, then we just copy the font file to the ~/.fonts directory. If this directory is not ~/.fonts, then we will create this directory first. Tilde ~ Represents the current user's home directory, which is/home/<username>. Enter the following command in the terminal

mkdir ~/.fonts

Then copy the font file to the ~/.fonts directory.

Cp-r ubuntu-font-family-0.80/~/.fonts/

After the copy is complete, enter the following command to refresh the font information file.

Fc-cache-f-V

This is the generic installation font method. Here are some shortcuts or special methods for installing fonts for the Debian system and Redhat system distributions.

Debian Department and Redhat Linux distributions install Microsoft Fonts installation Microsoft core font set (Microsoft Center Fonts)

Microsoft Core fonts contains the following Latin fonts:

* Andale Mono
* Arial Black
* Arial (Bold, Italic, bold Italic)
* Comic Sans MS (Bold)
* Courier New (bold, Italic, bold Italic)
* Georgia (Bold, Italic, bold Italic)
* Impact
* Times New Roman (bold, Italic, bold Italic)
* Trebuchet (Bold, Italic, bold Italic)
* Verdana (Bold, Italic, bold Italic)
* Webdings

Debian users simply open the terminal and enter the command

sudo apt-get install Ttf-mscorefonts-installer

Redhat user input the following command

sudo yum install cabextractsudo yum install http://sourceforge.net/projects/mscorefonts2/files/rpms/ msttcore-fonts-installer-2.6-1.noarch.rpm

After the command execution is complete, Microsoft Core fonts is installed. But how to install the Chinese font on Windows system? How to install those fonts such as Arial, blackbody, script and so on? We can first click this link to download the Microsoft Chinese font set, and then copy the Microsoft Chinese font set to the/usr/share/fonts/truetype/directory in a common way.

Little Tips

The font installation directory of the Windows system is C:\Windows\Fonts, the font file in this directory is divided into 3 extension, one is the. fon extension, is the font of the DOS system; one is the. ttf extension, this is the West text body, and the. ttf extension is a Chinese font. We can't use the font of the DOS system. If your computer is a Windows+linux dual system, then you can mount the Windows C drive to the Linux system first. The. TFF and. ttf font files in the C:\Windows\Fonts directory are then copied directly to the/usr/share/fonts/truetype directory.

For example, my Windows system C disk device number is/DEV/SDB1, execute the following command Mount C drive

sudo mount/dev/sdb1/mnt

Create a new directory for Windows fonts

sudo mkdir/usr/share/fonts/truetype/windowsfonts

Then copy the. ttf and. ttf extension Windows font files to the/usr/share/fonts/truetype/windowsfonts directory

sudo cp-r/mnt/windows/fonts/*.ttf/usr/share/fonts/truetype/windowsfonts/sudo cp-r/mnt/Windows/Fonts/*. ttf/usr/share/fonts/truetype/windowsfonts/

This installs the Windows Latin and Chinese fonts. From a legal standpoint, this violates Microsoft's end-user agreement. Because the fonts in Windows System C are only authorized to be used on Windows systems, it is not legal to use them on Linux systems.

Install Open source Chinese fonts

Enter the following command in the terminal to install the open source Wen Quan Shu micron black and Wenquanyi Zen Hei black font

Debian Department users

sudo apt-get install Ttf-wqy-microhei Ttf-wqy-zenhei

Redhat System Users

sudo yum install wqy-microhei-fonts wqy-zenhei-fonts

How to install fonts on a Linux system

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.