.Xresources font names
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 isfixed
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 isfixed
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 likesans
orcondensed
— usually empty) to100
. 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.
Related videos on Youtube
user001
Updated on September 18, 2022Comments
-
user001 over 1 year
Many references describing the manipulation of bitmap font face and size for
xterm
via the~/.Xresources
config file suggest the use of an entry likeXTerm.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. -
user001 over 9 yearsThat'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 theadstyl
column rather than thepxlsz
column.