1

Many references describing the manipulation of bitmap font face and size for xterm via the ~/.Xresources config file suggest the use of an entry like XTerm.VT100.font: -*-fixed-*-*-*-100-*-*-*-*-*-*-*. I have wondered what is the purpose of the -* characters and whether there is any logic to their placement and number. All the references I have consulted use these characters in their examples for modifying the font (although the total length of the -* string is somewhat variable), but none explain the purpose or significance of these characters.

3

These are designations for traditional, server-rendered X11 fonts. The name format is called X logical font description (XLFD). There is an introductory description in the X man page.

An XLFD contains 14 fields, each prefixed by a dash. The position of the field determines its meaning: foundry, family, weight, etc. A field can contain the value * to allow the server to pick any. For example:

  • -*-fixed-*-*-*-*-100-*-*-*-*-*-*-* means any font whose family name is fixed and whose pixel size (height as a number of pixels on the screen) is 100 (which is huge).
  • -*-fixed-*-*-*-*-*-100-*-*-*-*-*-* means any font whose family name is fixed and whose point size (height in units of 0.1 points, where points are defined by the resolution in the next two fields) is 100 points (which is tiny).
  • -*-fixed-*-*-*-100-*-*-*-*-*-*-* doesn't match any font because it sets the style (which is something like sans or condensed — usually empty) to 100. With missing fields, the last * matches multiple fields.

You can run xfontsel to browse the available fonts on your system. For bitmap fonts, xfontsel lists all available sizes. For vector fonts, you can pick any size.

Many applications support client-rendered fonts nowadays, which allows for nice features such as antialiasing. These use fontconfig to look up fonts, with completely different naming conventions.

  • That's very helpful. Thanks for the examples as well as for pointing me to the XLFD for the full specifications. I wasn't aware of xfontsel, but find it to be a rather helpful tool for viewing the effect of varying parameters. Your answer also explains why changing the number in the font designation in my question wasn't changing the font size: the number was in the adstyl column rather than the pxlsz column. – user001 Aug 17 '14 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.