For users who use x window, it is very important to have a beautiful interface. Only in this way, when work, I can feel entertaining, otherwise, look at the size of the font, I am afraid no one will have Mood is doing your own work.
Due to the copyright of the Chinese TTF font library, many Linux hairstyles do not carry the most commonly used Simplified Chinese Library. Although Taiwan's Ding Ding donated four Chinese characters to the free community, the Simplified Chinese fonts were only incompletely supporting the GB2312 character set, which is not enough for most applications. RedHat and other hairstyles have purchased some Chinese fonts, but their effect is not good, so rh / fedora's Chinese users generally install other Chinese fonts.
Debian's font management has its own set, it can be said to be very convenient, because it is very easy to beautify the Chinese desktop of Debian. Here, I only introduce how to use the traditional Chinese fonts that have been packaged to complete the beautification of the system, make the Chinese character bag and the DEBIAN font management program DEFOMA, please refer to the relevant documentation. In addition, the content described herein is only applicable to SARGE and SID users. For Woody users, some key packages are not very good for Chinese support.
The following is experimentally experimented on my own machine, but if there is any other problem on your system, you can contact me directly.
Install the necessary package
To beautify your desktop environment, you must first install some packages, use the following command to install it as the administrator, you can skip this step if you have already installed.
#
Apt-Get Install X-TTCIDFONT-CONF
This package is a plugin of DEFOMA for managing TrueType and CID fonts. We want to use some of them to manage the TrueType font.
In the process of installation, the system will prompt you to add two directories into the X Window configuration file. If you don't do this, the traditional X Window application will not be able to use the trueType font for Defoma. Therefore, editing / etc / x11 / xf86config-4 with a text editor, adding in the FILES section:
Fontpath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/thb/defoma/x-ttcidfont-conf.d/dirs/cid"
If you are confident that you don't use a CID font, you can not add a second line.
Install English font package
Although this paper focuses on the beautification of the Chinese desktop, but there is no beautiful English font, the desktop can't get a good job. There are many English fonts that can be selected on Linux, where I personally appreciate the VERA series fonts from BitStream, and Windows core fonts provided by Microsoft. The former is an open source font, while the latter can download free from SourceForge. Because many documents are written on Windows, the best display effect can be obtained using the core font of Windows.
BitStream fonts can be installed directly with the APT-GET command, while the core font of the MS needs to be downloaded from the SourceForge's Smart Package Of Microsoft's Core Fonts project, or is downloaded by the installer during the installation. Use the following command to install the above font:
# APT-GET Install TTF-BitStream-Vera Mstcorefonts
The path to the downloaded font package is required to provide the path of the downloaded packet or provide a network environment that can directly access the SourceForge when installing the latter.
Install Chinese font package
Since the Chinese character package that needs to be installed is not the content in the Debian official release, there is a need to modify /tc/apt/sources.list, where is younger as follows: DEB http://211.100.7.181/~liling/debian/ttfonts/ ./
If you are in the North School, you can use the following address:
DEB http://10.1.0.155/~liling/debian/ttfonts/. /
Then execute the following command:
# APT-GET Update # Apt-Get Install TTF-Microsoft-Simsun TTF-Microsoft-SimSun TTF-Microsoft-SimSun TTF-Microsoft-Simhei # APT-GET Install TTF-Microsoft-SiMYOU TTF-Microsoft-SIMLI
These Chinese font packages use TTF fonts in Chinese Win98 and Office, in order to match CJK-Latex, the TTF rather than the TTC font when packaged.
These fonts can be accessed through -Default-song - *, - default-hei - *, - default-hei - *, and -default-lisu- * in x window applications. In addition, two commonly used Chinese characters imitation Song and, we use the version provided by Wenting Company, and their names in the debian package are TTF-ARPHIC-GBSN00LP and TTF-ARPHIC-GKAI00MP, and the APT-GET command can be used To install it.
After the Chinese font is installed, you can restart x window or refresh the font with XSET, and then use XFontsel to see the new font.
At the same time, you can see new fonts in the dialog box of font selection.
If you want to manually install the font rather than using font packages, the most important thing is to prepare the DEFOMA font description file for each font, DEFOMA is to register font information for each required application through these descriptions. The above four fonts describe the documentation for simsun.hints, Simhei.hints, Simli.hints, SIMYOU.HINTS. The command of the registered font is deFoma-hints, which is still much more, and will not be described here.
Modify FontConfig configuration
After installing the Chinese TrueType font, you can achieve the effect of getting a beautiful font by modifying the configuration of the application, however, is there a solution that can get a beautiful font without any modification? The answer is yes, as long as the configuration of fontconfig is modified.
FontConfig's configuration is a file in XML format. Its role is to match between the font names required by the application and the system-installed fonts, and modify the default configuration of the font, such as AA (Antialias).
FontConfig has two system configuration files and a user profile. The system profile is /etc/fonts/fonts.conf and /etc/fonts/local.conf, respectively. The former is used by the manufacturer of the model, the latter is used by the system administrator. The latter has a relatively high priority, once it is a system configuration font, it will not be affected by the software package provided by the hairstyle provider, even if the fontconfig package is upgraded, do not have to worry about writing a good configuration coverage. . In each user's Home directory, you can also store a .fonts.conf file, the highest priority of this file, but it only affects the current user.
It is a more troublesome thing to change your Fontconfig. The most convenient is to bring someone else's local.conf to cover the original version, or as an individual's profile. Here, give the local.conf file I are using for reference.
After installing the font profile, restart X WINDOW again, you can get a beautiful font. Problem of individual software
Since there are some softwares that are not written for GNOME or KDE, their font configurations will have special places. The traditional X Window application cannot use the results of FontConfig directly, so some special configurations are required.
Mozilla browser
Mozilla browser and browser using it as a core such as Epiphany and Galeon need to install the plug-in to use XFT to display the font. Just install the package mozilla-xft. If you use the configuration you belong, you can see the beautiful font without modifying.
GTK 1.x
For early applications using GTK 1.x, they have their own unique configuration fonts. For Simplified Chinese, as long as the /etc/gtk/gtkrc.zh_cn is modified, the content is replaced with:
Style "gtk-default-zh-cn" {fontset = "-adobe-helvetica-medium-r-normal - 12- * - * - * - * - * - ISO8859-1, -Default-song-medium-r -NORMAL - 12 - * - * - * - * - GBK-0, * -R - * "} Class" gtkwidget "style" gtk-default-en-cn "
If you use the UTF-8 character set, the file that needs to be modified is /etc/gtk/gtkrc.utf-8, and the content is replaced with:
Style "default-text" {fontset = "-default-song-medium-r-normal - * - 120 - * - * - p - * - ISO10646-1, - * - Helvetica-medium-r-normal - * -120 - * - * - * - * - * - * "} Class" gtkwidget "style" default-text "
I have been a long time, I have been used to use the GTK 1.x program in the UTF-8 character set to see Chinese, one permeate what software is bug. Finally, I learned that since I set the width of the Chinese font to fixed in Defoma, the X font generated by DEFOMA only uses the -c- and -m-width font, the two width description either single The width of the character font is either the width of the widest double character font, which is not suitable for displaying Chinese and English mix. Therefore, it is necessary to change the width of the font to Variable, although all the English width in the fonts such as SIMSUN is the same, all Chinese widths are the same, but the whole is different. Such settings, when the software such as XMMS is started, there will be a pause, and some people call it fake, this pause is the computer to calculate the width of each character.
Qt
For users who use Gnome, sometimes some QT applications are required. If KDE is installed, you can use its corresponding program to configure it, or you can configure the QT configuration program. But if you don't want to install these programs, you get a beautiful font, you can write directly to a configuration file ~ / .qt / qtrc, so you can get a beautiful font.
OpenOffice.org
OpenOffice is the best one for MS Office document compatibility in the Office software you can use on Linux. Although OpenOffice uses a GNOME interface, it has its own font configuration. In Debian, you can install OpenOffice directly:
# APT-GET Install OpenOffice.org-l10n-zh-CN TTF-Baekmuk This will automatically install Chinese OpenOffice and the necessary packages.
After the installation is complete, start OpenOffice will find that the Chinese font is very ugly. At this time, select the tool, option in the menu, select OpenOffice.org, font in this dialog, and choose to use the replacement table, replace the font Baekmuk Dotum to SIMSUN, and check the Auto and screen.
At this time, OpenOffice should already have a beautiful menu. But I don't know how to set OpenOffice to make it beautiful fonts directly, if you know, please contact me, thank you.
Emacs
The following is a part I set font in the Emacs profile. After I changed the CVS version of Emacs, I didn't use this paragraph, but the method of modifying the X resource file below.
; Create A fontsets (Create-Fontset-Fontset-Spec "-adobe-Courier-Medium-R - * - * - - 14 - * - * - * - * - * - FONTSET-Adobe, Latin-ISO8859-1 : -adobe-capital-medium-r - * - * - 14- * - * - * - * - * - * - *, latin-ISO8859-2: -ADOBE-COUR-Medium-r - * - * - 14 - * - * - * - * - * - - * - 2, CYRILLIC-ISO8859-5: -ADOBE-COUR-Medium-R - * - * - 14 - * - * - * - * - * - * - 5, Create-GB2312: * - Song-Medium-R-NORMAL - * - 14 - * ") (Create-Fontset-from-fontSet-Spec" -adobe-channel-medium-o - * - * - 14- * - * - * - * - * - FontSet-Adobe, Latin-ISO8859-1: -ADOBE-COUR-Medium-O - * - * - 14 - * - * - * - * - * - * - - 1, LATIN-ISO8859- 2: -adobe-capital-medium-o - * - * - 14- * - * - * - * - * - * - - 2, cyrillic-iso8859-5: -adobe-coier-medium-o - * - * - 14 - * - * - * - * - * - * - 5, CHINESE-GB2312: * - Song-Medium-R-NORMAL - * - 14 - * ") (Create-Fontset-from-fontset-Spec" -adobe -COURIER-BOLD-O - * - * - 14 - * - * - * - - ADOBE-ISO8859-1: -ADobe-Courier-Bold-O - * - * - 14 - * - * - * - * - * - * - 1, LATIN-ISO8859-2: -ADOBE-COUR-BOLD-O - * - * - 14- * - * - * - * - * - * --- * - Cyrillic-ISO8859 -5: -adobe-capital-bold-o - * - * - 14- * - * - * - * - * - * - 5, Chinese-GB2312: * - Song-Medium-r-Normal - * - 14- * ") (Create-fontset-rays" -adobe-channel-bold-r - * - * - 14- * - * - * - * - * - fontset-adobe, latin-iso8859-1: -adobe -COURIER-BOLD-R - * - * - 14 - * - * - * - - ISO8859-2: -ADOBE-COUR-BOLD-R - * - * - 14 - * - * - * - * - * - * - 2, Cyrillic-ISO8859-5: -ADOBE-COUR-BOLD-R - * - * - 14 - * - * - - * - * - * - * - 5, CHINESE-GB2312 : * - Song-Medium-R-Normal - * - 14 - * ") (setq default-frame-alist (append") ((font. "fontset-adobe) (Width. 78))))))))))) ~ / .XDEFAULTS
Many traditional X applications are configured using a resource database to configure the font, color of the application. Many of these programs are now very uncomfortable, such as XMAN, but there are many so far we are using powerful tools every day, such as Emacs. To configure the fonts of these programs, you need to write the description of the resource to the file ~ / .xdefaults, then load it through the XRDB command.
The following is the content of my ~ / .xdefaults file, which is configured with Emacs, Xfontsel and XMAN: Emacs.Pane.MenuBar.font: 7x14emacs.Menu * .font: 7x14emracs.dialog * .font: 7x14emacs.font: fontset -Songemacs.FontSetList: Song Kai Hei Lucidaemacs.fontset-0: -Misc-fixed-Medium-r - * - * - 14 - * - * - * - * - * - FontSET-SONG, MULE-Unicode-0100-24FF : -misc-fixed-medium-r-NORMAL - 14- * - * - * - * - * - ISO10646-1, Chinese-GB2312: - * - Song-Medium-r - * - 14- * - * - * - * - * - GB2312 * -0EMACS.FONTSET-1: -MISC-FIXED-Medium-R - * - * - 14 - * - * - * - * - * - FONTSET-KAI, MULE-UNICODE-0100 -24FF: -Misc-fixed-medium-r-NORMAL - 14- * - * - * - * - * - ISO10646-1, Chinese-GB2312: - * - KAI-Medium-R - * - 14- * - * - * - * - * - GB2312 * -0EMACS.FONTSET-2: -MISC-FIXED-Medium-R - * - * - 14 - * - * - * - * - * - FontSet-Hei, MULE-Unicode -0100-24ff: -Misc-fixed-medium-r-NORMAL - 14- * - * - * - * - * - ISO10646-1, Chinese-GB2312: - * - HEI-Medium-r - * - 14 - * - * - * - * - * - GBK-0xFontsel. *. font: 7x14xman. *. font: 7x14xman. * .manualfontnormal: -Misc-fixed-medium-r - * - * - 14 - * - * - * - * - * - * - * xman. * .Manualfontbold: -MISC-FIXED-BOLD-R - * - * - 14 - * - * - * - - * - * - * - * xman. * .Manualfontitalic: - MISC-Fixed-Medi UM-O - * - * - 13 - * - * - * - * - * - * - * - xman. *. DIRECTORYFONTNORMAL: -MISC-FIXED-MedIUM-R - * - * - 14 - * - * - * - * - * - * - *
It should be noted that the content in ~ / .xdefaults file is not automatically read, and the xrdb -merge ~ / .xdefaults command is required after each starting X. If you want its content to be automatically read, you can set the environment variable XenVironment, or you can name it ~ / .xdefaults-hostname, where Hostname is the host name you are using.
$ Date: 2004/12/13 17:03:12 $
HOME
FEEDBACK
Copyright © 2003-2004 Li Ling.