Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of installing fonts in FreeBSD system

Shulou Source: shulou.com Published: 2022-06-01 07:54:23 10月05日 Update

This article mainly introduces "the method of installing fonts in FreeBSD system". In the daily operation, I believe that many people have doubts about the method of installing fonts in FreeBSD system. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the method of installing fonts in FreeBSD system". Next, please follow the editor to study!

Therefore, we need to add fonts manually, which can be done in two ways:

1. Add Type1 fonts such as Times Roman,Helvetica,Palatino

The URW font collection (x11-fonts/urwfonts) includes high-quality standard type1 fonts. So just install URW:

1.1 install URW

# cd / usr/ports/x11-fonts/urwfonts

# make install clean

1.2 configure URW

The following configuration needs to be added to the X server's configuration file (/ etc/X11/xorg.conf):

FontPath "/ usr/local/lib/X11/fonts/URW/"

It can also be executed as a command in the current session, and the following needs to be executed on the Terminal of the X desktop.

% xset fp+ / usr/local/lib/X11/fonts/URW

% xset fp rehash

2. Install Microsoft Yahi, Song style and other Chinese fonts, namely TrueType ®fonts

Xorg has built-in support for TrueType ®fonts

2.1 profile

Add the following line to the "Module" section of the / etc/X11/xorg.conf file

Load "freetype"

2.2 create a directory for TrueType ®fonts

For example, / usr/local/lib/X11/fonts/TrueType, and then copy all the TrueType ®fonts to this directory. Remember that you cannot extract TrueType ®fonts directly from a Macintosh ®computer; what can be used by X11 must be in UNIX ®/ MS-DOS ®/ Windows ®format.

Use ttmkfdir to create fonts.dir files so that the X font engine knows that you have installed these new files.

2.3.1 ttmkfdir needs to be installed, which can be installed directly with pkg_add-r ttmkfdir.

2.3.2

# cd / usr/local/lib/X11/fonts/TrueType

# ttmkfdir-o fonts.dir

2.4 add the TrueType ®font directory to the font path

The following configuration needs to be added to the X server's configuration file (/ etc/X11/xorg.conf):

FontPath "/ usr/local/lib/X11/fonts/TrueType"

If you want to enable it immediately, enter: (the following command needs to be executed in the Terminal of the X desktop)

% xset fp+ / usr/local/lib/X11/fonts/TrueType

% xset fp rehash

okay. Now Netscape ®, Gimp,StarOffice ™and all other X applications should recognize the installed TrueType ®fonts. Some small fonts (such as high-resolution text displayed on Web pages) and some large fonts (under StarOffice ™) look good now.

3. Install Wenquanyi Chinese font:

# whereis wqy

Wqy: / usr/ports/x11-fonts/wqy

# cd / usr/ports/x11-fonts/wqy

# make install clean

About 15 minutes, ok.

Have the X system load fonts when it starts.

Edit / etc/X11/xorg.conf

Add a line to Section "Files", and FontPath "/ usr/local/lib/X11/fonts/wqy" looks like this

Section "Files"

ModulePath "/ usr/local/lib/xorg/modules"

FontPath "/ usr/local/lib/X11/fonts/misc/"

FontPath "/ usr/local/lib/X11/fonts/TTF/"

FontPath "/ usr/local/lib/X11/fonts/OTF"

FontPath "/ usr/local/lib/X11/fonts/Type1/"

FontPath "/ usr/local/lib/X11/fonts/100dpi/"

FontPath "/ usr/local/lib/X11/fonts/75dpi/"

FontPath "/ usr/local/lib/X11/fonts/wqy"

EndSection

At this point, the study on "the method of installing fonts in FreeBSD system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Font file configuration method system learning directory Chinese font command method more server desktop face Chinese recoverable help service practical very large Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft macOS Xiaomi Linux NVidia