• How to look for appropriate fonts ?

    From Spiros Bousbouras@21:1/5 to All on Sun Jun 25 10:05:40 2023
    I have a Debian installation where -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1 is just
    right for terminal emulators ; I want a monospace font of course and
    the size is right. But with a new Devuan installation , this font is
    a bit too small. So the question is , how do I go about searching for
    an appropriate font ? I know of the existence of xlsfonts and
    xlsfonts -ll <pattern> prints output which is probably relevant but
    I don't know how to interpret it. Apart from interpreting it , is there
    some tool which you can instruct to "show me all the fonts on the system
    for which parameters such and such are within certain bounds" or is it
    a case of writing a script which will parse the output of xlsfonts and
    pick up the values I'm interested in ?

    It would also be nice if I got a font where 0 (zero) has a dot inside to
    make it more easy to distinguish from O (capital O). The aforementioned
    font does not but , if there is an automatic way to search for that too ,
    it would be a plus.

    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

    .The man page is not clear enough to me whether both are relevant to the output I'm seeing or one overrides the other. On xterm 0 does have a dot inside but on an eterm started with the same adobe font it does not so I'm thinking that for xterm perhaps only the -fa is relevant. Lower case ell looks different between the two emulators and nicer on xterm .

    Finally , for "cross-referencing" purposes I will remind of a thread from 2018 which asks a somewhat analogous question :

    From: gazelle@shell.xmission.com (Kenny McCormack)
    Newsgroups: comp.unix.programmer,comp.windows.x
    Subject: Looking for a really *BIG* terminal font for Linux (xterm)
    Date: Tue, 16 Oct 2018 14:52:32 +0000 (UTC)
    Message-ID: <pq4tvg$qqo$1@news.xmission.com>

    The other posts were
    Message-ID: <CknxD.91524$SG2.91219@fx29.iad>
    Message-ID: <pq51k9$bhe$1@dont-email.me>
    Message-ID: <g2sfb1F17c1U1@mid.individual.net>
    Message-ID: <pqfpv8$i4s$1@news.xmission.com>
    Message-ID: <g31lq0F33olU1@mid.individual.net>

    --
    Cost does indeed vary as the product of the number of men and the number of months. Progress does not. Hence the man-month as a unit for measuring the
    size of a job is a dangerous and deceptive myth. It implies that men and
    months are interchangeable.
    "The mythical man-month"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ivan Shmakov@21:1/5 to All on Sun Jun 25 18:27:55 2023
    [...]

    So the question is, how do I go about searching for an appropriate font?

    I think the tool you're looking for is xfontsel(1). You may also
    find xfd(1) handy.

    I know of the existence of xlsfonts and xlsfonts -ll <pattern> prints
    output which is probably relevant but I don't know how to interpret it.

    (I believe xlsfonts needs -fn to specify a pattern.)

    Apart from interpreting it, is there some tool which you can instruct
    to "show me all the fonts on the system for which parameters such and
    such are within certain bounds"

    Aside of that xfontsel(1) also supports -pattern, can't say I'm
    aware of any such tool.

    [...]

    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 .

    The man page is not clear enough to me whether both are relevant to
    the output I'm seeing or one overrides the other.

    It's pretty clear in the copy I have at hand:

    -fa pattern

    If you specify both -fa and the X Toolkit option -fn,
    the -fa setting overrides the latter.

    FWIW, my long-time preference is to use Terminus fonts, the
    X version of which is provided by the xfonts-terminus package.
    Depending on the X display resolution, they can be configured
    as follows in XRDB (which typically gets initialized from
    ~/.Xresources at the X session initialization time.) See also
    http://bugs.debian.org/685329 .

    !! Smaller fonts XTerm.VT100.font2:-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 XTerm.VT100.font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1 XTerm.VT100.font3:-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1 XTerm.VT100.font4:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1 XTerm.VT100.font5:-xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1 XTerm.VT100.font6:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1

    !! Larger fonts XTerm.VT100.font2:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1 XTerm.VT100.font: -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1 XTerm.VT100.font3:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1 XTerm.VT100.font4:-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1 XTerm.VT100.font5:-xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1 XTerm.VT100.font6:-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1

    --
    FSF associate member #7257 http://am-1.org/~ivan/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Javier@21:1/5 to Spiros Bousbouras on Sun Jun 25 20:11:00 2023
    Spiros Bousbouras <spibou@gmail.com> wrote:
    I have a Debian installation where -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1 is just
    right for terminal emulators ; I want a monospace font of course and
    the size is right. But with a new Devuan installation , this font is
    a bit too small.

    If you are using multiple distros you can override the system fonts
    and have a font directories in your $HOME:

    MYFONTDIR=${HOME}/local/share/fonts
    mkdir -p ${MYFONTDIR}

    Place the font subdirs under ${HOME}/local/share/fonts
    And create/update the index files fonts.dir, fonts.scale:

    mkfontscale ${MYFONTDIR}/*/
    mkfontdir ${MYFONTDIR}/*/

    and add those dirs the font path

    xset +fp ${MYFONTDIR}/*/
    xset fp rehash

    That should override the sytem font (although I have not tested that)

    So the question is , how do I go about searching for
    an appropriate font ?

    Message-ID: <g31lq0F33olU1@mid.individual.net>

    As Jens Schweikhardt said in the 2018 thread, search for packages with 'monospaced font', or 'programmer font' or 'terminal font' in your distro.
    I get a lot of hits in Arch Linux:

    yaourt -Ss monospaced

    extra/adobe-source-code-pro-fonts
    Monospaced font family for user interface and coding environments community/tamsyn-font 1.11-4 [installed]
    A monospaced bitmap font for the console and X11 community/ttf-fantasque-sans-mono 1.8.0-2
    Font family with a great monospaced variant for programmers community/ttf-iosevka-nerd 2.1.0-1
    Typeface family designed for coding, terminal use and technical documents
    (Nerd Fonts)
    ...
    aur/nerd-fonts-sf-mono 3.0.2-1 (8) (0.48)
    Monospaced variant of San Francisco. Sourced directly from Apple, patched
    with the Nerd Fonts Patcher
    aur/ttf-proggy-vector 1.1.5-1 (4) (0.01)
    Proggy Vector is Monospaced, Fixed-width TrueType font optimized for C,C++
    programming.
    aur/uw-ttyp0-font 1.3-6 (12) (0.00)
    Bitmap monospaced font with unicode support and Powerline symbols aur/woff-intel-one-mono 1.2.1-2 (13) (7.77)
    Expressive monospaced font family that’s built with clarity, legibility,
    and the needs of developers in mind
    aur/nerd-fonts-git 1:3.0.0.r30.g58504d670-1 (16) (0.47)
    Iconic font aggregator, collection, and patcher: 34 patched fonts (77k
    variations). Includes popular glyph collections such as Font Awesome &
    fonts such as Hack
    ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to Ivan Shmakov on Tue Jun 27 10:07:17 2023
    On Sun, 25 Jun 2023 18:27:55 +0000
    Ivan Shmakov <ivan@siamics.netNOSPAM.invalid> wrote:
    [...]

    So the question is, how do I go about searching for an appropriate font?

    I think the tool you're looking for is xfontsel(1). You may also
    find xfd(1) handy.

    I know of the existence of xlsfonts and xlsfonts -ll <pattern> prints output which is probably relevant but I don't know how to interpret it.

    (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'

    produce the same output.

    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 .

    The man page is not clear enough to me whether both are relevant to
    the output I'm seeing or one overrides the other.

    It's pretty clear in the copy I have at hand:

    -fa pattern

    If you specify both -fa and the X Toolkit option -fn,
    the -fa setting overrides the latter.

    Yes , I saw the Devuan man page says so but the Debian older one does
    not.

    FWIW, my long-time preference is to use Terminus fonts, the
    X version of which is provided by the xfonts-terminus package.
    Depending on the X display resolution, they can be configured
    as follows in XRDB (which typically gets initialized from
    ~/.Xresources at the X session initialization time.) See also
    http://bugs.debian.org/685329 .

    !! Smaller fonts XTerm.VT100.font2:-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
    XTerm.VT100.font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
    XTerm.VT100.font3:-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
    XTerm.VT100.font4:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1
    XTerm.VT100.font5:-xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
    XTerm.VT100.font6:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1

    !! Larger fonts XTerm.VT100.font2:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1
    XTerm.VT100.font: -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
    XTerm.VT100.font3:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
    XTerm.VT100.font4:-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
    XTerm.VT100.font5:-xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
    XTerm.VT100.font6:-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1

    How do you distinguish between large and small ? Because some fonts appear on both lists above.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to Spiros Bousbouras on Tue Jun 27 09:43:51 2023
    On Sun, 25 Jun 2023 10:05:40 -0000 (UTC)
    Spiros Bousbouras <spibou@gmail.com> wrote:
    I have a Debian installation where -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1 is just
    right for terminal emulators ; I want a monospace font of course and
    the size is right. But with a new Devuan installation , this font is
    a bit too small. So the question is , how do I go about searching for
    an appropriate font ? I know of the existence of xlsfonts and
    xlsfonts -ll <pattern> prints output which is probably relevant but
    I don't know how to interpret it.

    I read
    www.x.org/releases/X11R7.6/doc/xorg-docs/specs/XLFD/xlfd.html and ,
    based on the information there , I understand a lot more the output of
    xlsfonts and about fonts in general. The page has

    SN POINT_SIZE Field
    [...]

    POINT_SIZE and RESOLUTION_Y are used by X clients to query fonts
    according to device-independent size to maintain constant text size on
    the display regardless of the PIXEL_SIZE used for the font.

    [I don't know what the SN is ; perhaps it's a typo] Based on what it says ,
    I shouldn't be getting different sizes since I asked for the same font
    which means in particular that all the parameters related to physical appearance were the same. I should note that the Debian installation is
    on a 22 inch monitor with resolution 1680 x 1050 whereas the Devuan
    is for a 21.5 inch monitor with resolution 1920 x 1080. Perhaps this is
    the reason for the difference in size but still , the impression I get
    from ...xlfd.html is that the aim is for {same parameters imply
    same appearance on different devices}.

    --
    and then listening in quizzical bemusement from the mid-1970s onward as the composer evidently convinced himself he had been on a road to nowhere, and
    that what he really needed to be doing was to compose, among other things,
    all of the song cycles and symphonies that Mahler and Shostakovich never
    lived long enough to write.
    http://5against4.com/2021/06/16/krzysztof-penderecki-complete-music-for-string-quartet-string-trio

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to Javier on Tue Jun 27 10:21:27 2023
    On Sun, 25 Jun 2023 20:11:00 +0000
    Javier <invalid@invalid.invalid> wrote:
    Spiros Bousbouras <spibou@gmail.com> wrote:
    I have a Debian installation where -adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1 is just right for terminal emulators ; I want a monospace font of course and
    the size is right. But with a new Devuan installation , this font is
    a bit too small.

    If you are using multiple distros you can override the system fonts
    and have a font directories in your $HOME:

    MYFONTDIR=${HOME}/local/share/fonts
    mkdir -p ${MYFONTDIR}

    I don't think that I was seeing different sizes because the system ignored
    my font specification so overriding system fonts would not help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Javier@21:1/5 to Spiros Bousbouras on Tue Jun 27 14:43:58 2023
    Spiros Bousbouras <spibou@gmail.com> wrote:
    I don't think that I was seeing different sizes because the system ignored
    my font specification so overriding system fonts would not help.

    My guess was that either the upstream font devs changed something, or
    that Debian devs decided to patch the package, so having a local copy
    of the "good version" of the font in your $HOME should help.

    Given the hectic the pace of changes in the modern world, nowadays
    I am resorting more and more to keeping personal snapshots of the
    "good versions" of things in my own hard disk (fonts, documentation,
    program sources).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Javier@21:1/5 to Spiros Bousbouras on Tue Jun 27 14:31:53 2023
    Spiros Bousbouras <spibou@gmail.com> wrote:

    !! Smaller fonts
    XTerm.VT100.font2:-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1
    XTerm.VT100.font: -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
    XTerm.VT100.font3:-xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1
    XTerm.VT100.font4:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1
    XTerm.VT100.font5:-xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
    XTerm.VT100.font6:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1

    !! Larger fonts
    XTerm.VT100.font2:-xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1
    XTerm.VT100.font: -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1
    XTerm.VT100.font3:-xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1
    XTerm.VT100.font4:-xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1
    XTerm.VT100.font5:-xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1
    XTerm.VT100.font6:-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1

    How do you distinguish between large and small ? Because some fonts appear on both lists above.

    Those are two different lists for fonts (likely for 2 different
    monitors with different pixel size). XTerm has only six slots for
    fonts, which you cycle with Shift-Keypad Add, Shift-Keypad Substract.

    Six fonts were enough for everybody in the 80-90s, with small display resolutions, and not many fonts defined in the system. Nowadays XTerm
    should be compiled with at least a dozen slots for fonts. I don't
    know if the reason for that limitation is memory footprint, or not
    wanting to have an oversized font menu, but with the hardware that
    people use nowadasys a dozen of fonts wouldn't hurt.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ivan Shmakov@21:1/5 to All on Wed Jun 28 20:27:33 2023
    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.

    --
    FSF associate member #7257 http://am-1.org/~ivan/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Spiros Bousbouras@21:1/5 to Ivan Shmakov on Mon Jul 3 08:19:07 2023
    On Wed, 28 Jun 2023 20:27:33 +0000
    Ivan Shmakov <ivan@siamics.netNOSPAM.invalid> wrote:
    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.

    Or have an escape sequence which allows you to change fonts of a running instance. eterm has them and as a result I have the following 2 BASH
    functions :

    large-font () {
    printf '\033]50;%s\007' '-adobe-courier-bold-r-normal--25-180-100-100-m-150-iso10646-1'
    }

    small-font () {
    printf '\033]50;%s\007' '-b&h-lucidatypewriter-bold-r-normal-sans-18-180-75-75-m-110-iso10646-1'
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)