GNOME Font Selector Manual
<<< Previous |  |

# Font attributes in X Window System and XLFD

As was said earlier, each font in X Window system has a number of attributes and a full name, also known as X Logical Font Description (XLFD), which lists all of these attributes and therefore is quite long. Typical font name looks like this

    	  -adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1

This name consists of 14 fields, showing the values of 14 parameters of the font, separated by dashes.

While such a name gives a complete information about the font, it is somewhat overwhelming, especially since not all of this parameters are actually useful. To make life a little bit easier, you can use wildcard * in the font name; for example, the previous font can also be referred to as

    	  -adobe-courier-medium-r-*-*-12-*-*-*-*-*-*-*

As usual, * matches any value; if there are several fonts matching the given name, the system will pick the first matching one. In this particular example, most probably there is only one font matching this name, so this name is unambiguous.

Below we list those of the font's 14 attributes which are actually useful:

- `foundry` font foundry, the company or individual which made the font (in our example, `adobe`)

- `family` font family, the popular nickname of the font (in our example, `courier`)

- `weight` font weight (in our example, `medium`). Admissible values: bold, medium, etc.

- `slant` font slant (in our example, `(r)oman`, i.e. unslanted). Admissible values: (i)talics, (o)blique, (r)roman, etc.

- `pixelsize` the number of pixels vertically in a character (in our example, 12)

- `pointsize` approximate point size of the font, measured in tenths of a point. In the example above, point size is 120, that is, 12 points. One point is equal to 1/72 of an inch, which is the common convention in English and American typesetting.

- horizontal and vertical `resolutions` in dots per inch in the example above, both are 75 dpi.

  Note that point size, pixel size, and vertical resolution are related: for fonts with resolution 75dpi, point size is approximately equal to (pixel size)*10; for fonts with resolution 100dpi, point size is approximately equal to (pixel size)*7.

- `spacing` describes variance of character sizes in the font. Allowed values are (m)onospaced, (c)haracter cell (in both of these spacings, all characters have the same width) and proportional (characters have varying sizes). Proportional fonts usually look nicer.

- character set `registry` and `encoding` these two parameters, commonly referred to as `character set`, or `charset` for short, describe what set of symbols (or what alphabet) this font represents. There is a number of possible charsets. Some of the most popular ones include:

  - iso8859-1, also known as Latin 1 this character set includes all the symbols found on the keyboard, i.e. Latin letters, punctuation marks, numbers, symbols such as @ or $. It also includes some special symbols, such as the copyright sign, and a number of accented letters, thus covering the needs of most Western European languages (to be precise, Afrikaans, Basque, Catalan, Danish, Dutch, English, Faeroese, Finnish, French, Galician, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Scottish, Spanish, and Swedish).

  - iso8859-7 includes Latin and Greek alphabets

  - iso8859-8 includes Latin and Hebrew alphabets

<<< Previous | Home |
Filter window |  |