>>>>> On 2023-06-27, Spiros Bousbouras wrote:
>>>>> On Sun, 25 Jun 2023 18:27:55 +0000, Ivan Shmakov wrote:
>> (I believe xlsfonts needs -fn to specify a pattern.)
> Looking at the man page more carefully , you are correct. However
> xlsfonts -ll -fn
> '*adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1'
> xlsfonts -ll '*adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1'
I see; -fn is apparently only needed when the pattern begins with
a dash. (And given that 'new,' XLFD-compliant X font names
universally begin with a dash, so should the patterns. Although,
assuming an ordinary setup, * or ? will of course also work.)
>>> I see that the xterm I'm running is started with the options
>>> (among others) -fa 'DejaVu Sans Mono:size=20'
>>> -fn -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1 .
Note that with -fn (were it not be overridden by -fa), you're
requesting a 25 pixels high font specifically. Depending on
the physical dimensions of the pixel on a given screen (also
expressed as a 'dots per inch,' or dpi, measure; see xdpyinfo
output for instance), the physical size of the font may vary.
AIUI, the idea was that by omitting the pixel size and
resolution fields, like, say:
-fn -adobe-courier-bold-r-normal--"*-180-*-*"-m-150-iso10646-1
the user would've been requesting the server to find an
appropriate font given its physical "point size," but so far
as I can tell, at least for bitmap (i. e., non-scalable) fonts,
this has failed to materialize in practice.
[...]
> How do you distinguish between large and small? Because some fonts
> appear on both lists above.
On my system, Terminus is available in 11 distinct pixel sizes:
$ xlsfonts -fn -xos4-terminus-medium-r-normal--"*-*-*-*-c-*"-iso10646-1 \
| uniq | nl -ba
1 -xos4-terminus-medium-r-normal--0-0-72-72-c-0-iso10646-1
2 -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
3 -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
4 -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
5 -xos4-terminus-medium-r-normal--17-120-100-100-c-0-iso10646-1
6 -xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1
7 -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
8 -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
9 -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
10 -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
11 -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1
$
Removing the (not particularly useful here) 0 px high font, as
well as the one having 0 px average width (which I'm not sure
about) still leaves 9 fonts to configure. Back in the day, XTerm
only supported 6 slots for fonts, corresponding to the 6 entries
in its Control+RightMouseButton "VT Fonts" menu (now there're 7),
hence I've decided to make two separate configuration files,
one having the biggest 6 fonts of the 9 "valid" ones above, and
another with the smallest 6; for user to choose whichever file
they see fit, presumably depending on the screen's resolution.
Ideally, XTerm should've allowed an arbitrary number of fonts
here (with some users preferring switching between just two or
three, others using a set that includes not only different font
sizes, but different actual fonts as well; such as by including
-misc-fixed- alongside -xos4-terminus-), but it doesn't seem to
be doable in a nice and clean way with libXt and X resources.