Fonts. dir File Analysis for Linux font settings

Source: Internet
Author: User
Article Title: fonts. dir File Analysis for Linux font settings. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Nowadays, many people like to build their own linux, and she is more beautiful than before. Setting fonts is a very important step. Many people are setting fonts. when a dir file is stored, it is usually copied directly from someone else. What is the structure of the dir file, or some users do not know how to create a font they prefer, in recent days, I have analyzed this document, and I have written some of my experiences for your reference, I haven't found any specific information in this regard for a long time. The following are my personal opinions. If there is anything wrong, please kindly advise.
Fonts. the first line of dir is generally to tell Xwindows the total number of lines of font information, starting from the second line is the formal font settings information, generally divided into two parts, the first part is the parameter part, it is defined in Part 2. Now I will analyze the following line of font information for your reference:
  
AB = y: ai =-0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-ro-normal -- 0-0-0-0-0-p-0-gb18030.2000-0
  
AB = y enables bold characters. By default, AB = n indicates that bold characters are not enabled when not set. It is used together with bold.
Ai =-0.4 tilt the width of a word 0.4 to the left. If ai = 0.4 is the width of a word 0.4 to the right, the default ai = 0. please use it with o or I. Because it is negative here, we also need to use it with r, so ro will be used later.
Sw = 1 the font width is 1 and the default value is 0. this is generally used in combination with the following p. When p is used, the displayed words may be stacked because it occupies the character width, after this is added, the distance between words and words will be opened.
Bw = 0.5 the font width between 0.5 characters. The default value is 0. Suppose you want to use italic, because italic width is relatively wide, for example, if bw =-0.4 above is the width of 0.4 characters left in the top part of the font, we can see the text for convenience, the font width is 0.5 (bw = 0.1), so there is no overlap between words.
Simsun. ttf font file name. This does not need to be explained.
Misc font manufacturer
Simsun font clearly states that we can modify the font as needed. For example, if we change the font to song, we can find the song font when setting the font in Xwindows.
Bold, there is another option medium (normal). If bold is used, add AB = y at the same time.
Ro reverse Oblique, where r (Roman Rome), I (Italic), o (Oblique skew) is reverse Oblique when r and the other two are used together. when I, o, ro, ri, etc. are used, use ai = n, where n = 0.2,-0.2, 0.4,-0.4, and so on. if you do not set ai = n, these will also lose effect.
The width of the normal character set is standard, and condensed, narrow, and double are also condensed)
0 pixel size, the font server will automatically modify, so it is generally 0.
0 point size, same as above.
0 x axis resolution, same as above.
0 y axis resolution, same as above.
The c-Character spacing is c, that is, the distance between one word and p, that is, the character distance.
The average width of 0. The font is automatically modified by the server, so it is generally 0.
Asccii-0 character set for asccii-0, other can also have a lot, such as: gb2312.1980-0, gb18030.2000-1, gb18030.2000-0, gbk-0, etc., specific can see
  
After analyzing a row, I will write a gb2312.1980-0 font. dir for you to use.
22 // the font of the following 22 characters
Simsun. ttf-misc-simsun-medium-r-normal -- 0-0-0-0-p-0-gb2312.1980-0 // set the SIMSUN character, using the p.
Ai = 0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-I-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
Ai = 0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-o-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
Ai =-0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-ri-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
Ai =-0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-ro-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
AB = y: simsun. ttf-misc-simsun-bold-r-normal -- 0-0-0-0-p-0-gb2312.1980-0
AB = y: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-r-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
AB = y: ai = 0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-I-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
AB = y: ai = 0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-o-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
AB = y: ai =-0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-ri-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
AB = y: ai =-0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-ro-normal -- 0-0-0-0-0-p-0-gb2312.1980-0
Simsun. ttf-misc-simsun-medium-r-normal -- 0-0-0-0-c-0-gb2312.1980-0 // set the simsun text, use the p.
Ai = 0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-I-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
Ai = 0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-o-normal -- 0-0-0-0-c-0-gb2312.1980-0
Ai =-0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-ro-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
Ai =-0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-medium-ri-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
AB = y: simsun. ttf-misc-simsun-bold-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
AB = y: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-r-normal -- 0-0-0-0-c-0-gb2312.1980-0
AB = y: ai = 0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-I-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
AB = y: ai = 0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-o-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
AB = y: ai =-0.2: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-ro-normal -- 0-0-0-0-0-c-0-gb2312.1980-0
AB = y: ai =-0.4: sw = 1: bw = 0.5: simsun. ttf-misc-simsun-bold-ri-normal -- 0-0-0-0-c-0-gb2312.1980-0
Related Article

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.