You are not logged in.
Pages: 1
Topic closed
I've long had issues with font-config which I've just not cared about. I don't use it for anything and prefer to avoid tools that use it. This has, however, prevented me from using the st terminal emulator.
I'd really like to give st a try again, but I'd like to use terminus font (that's [community]/terminus-font not any TTF variant of it). In order to use terminus, I need to have a string that fc-match will recognize as terminus. I am aware of the issue of the name changing from "Terminus" to "xos4 Terminus", but that is not my issue, rather font-config simply has no entry at all for terminus, the following returns nothing:
fc-match -a | grep -i termTerminus font is installed under /user/share/fonts/misc. This path is in a "Files" section of an xorg.conf.d file and is listed in my xorg log. But I don't think this should matter as the fontconfig wiki notes the following:
The font paths initially known to Fontconfig are: /usr/share/fonts/, ~/.local/share/fonts (and ~/.fonts/, now deprecated). Fontconfig will scan these directories recursively.
In my case, however, fontconfig is most definitely not scanning those directories recursively as dumping all files in the fc-list includes *only* /usr/share/fonts/TTF and /usr/share/fonts/OTF fonts:
$ fc-list : file | cut -d/ -f5 | sort -u
OTF
TTFOther directories are there, but ignored:
$ ls /usr/share/fonts
100dpi/ 75dpi/ OTF/ TTF/ Type1/ cyrillic/ encodings/ local/ misc/ util/Is fontconfig supposed to scan directories recursively as the wiki states? If so, how can I track down why it isn't for me? (I have forced a rebuild of the fc-cache but there has been no change). Alternatively, is there another way to specify a font for st? In urxvt despite being able to use fontconfig, if you pass it a proper XLFD it will use the specified font (I use terminus just fine in urxvt), st however does not seem to accept XFLDs.
I did start hacking away at st to remove all traces of fontconfig, but that turned out to be more work than I had anticipated.
(edit: typos)
Last edited by Trilby (2017-10-08 16:25:35)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm not a fan of font configuration either and have, like you, generally ignored it.
After reading your post, I looked at an old /etc/X11/xorg.conf file that I had used long ago for terminus font recognition in urxvt which still had an entry in the "Files" section for "/usr/share/fonts/local/". See, that's how much I pay attention to fonts. I didn't even realize that they were under misc now. Anyway, even with the erroneous xorg.conf, I still get misc showing in my fc-list and all my terminus fonts show up for
fc-match -a | grep -i termI have nothing in /etc/X11/xorg.conf.d and I removed my /etc/X11/xorg.conf and my terminus show up as it should so I'm not sure what's going on on your end. Odd?
edit: wrong code tagging
Last edited by bgc1954 (2017-10-08 15:27:49)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
Is fontconfig supposed to scan directories recursively as the wiki states? If so, how can I track down why it isn't for me? (I have forced a rebuild of the fc-cache but there has been no change).
To see which font directories are cached, use:
fc-cache -vOffline
Thanks bgc, it's good to at least know it *should* work. Now to figure out why mine isn't.
Diz, here's the output, the 'misc' directory is listed just like the OTF/TTF directories:
$ fc-cache -v
/usr/share/fonts: skipping, existing cache is valid: 0 fonts, 10 dirs
/usr/share/fonts/100dpi: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/75dpi: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/OTF: skipping, existing cache is valid: 23 fonts, 0 dirs
/usr/share/fonts/TTF: skipping, existing cache is valid: 69 fonts, 0 dirs
/usr/share/fonts/Type1: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/encodings: skipping, existing cache is valid: 0 fonts, 1 dirs
/usr/share/fonts/encodings/large: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/local: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/share/fonts/misc: skipping, existing cache is valid: 107 fonts, 0 dirs
/usr/share/fonts/util: skipping, existing cache is valid: 0 fonts, 0 dirs
/usr/local/share/fonts: skipping, no such directory
/home/jmcclure/.local/share/fonts: skipping, no such directory
/home/jmcclure/.fonts: skipping, no such directory
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/jmcclure/.cache/fontconfig: cleaning cache directory
/home/jmcclure/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeededI've been exploring other fc-* tools (via trial and error as none of the documentation provides a clear picture of any sort of deterministic behavior). I found `fc-cat` does include terminus and other fonts under `misc`, yet fc-list and fc-match do not find them - this makes no sense to me as the different fc-* tools seem to disagree on what is in the fontconfig cache.
----------------------------
Solution:
I had - following the wiki - enabled several configs by creating links under /etc/fonts/conf.d to config files in /etc/fonts/conf.avail. One of these was 70-no-bitmaps.conf which prevents fc-match from finding any bitmapped fonts even when they are specifically requested. I also had 75-yes-terminus.conf, but this has the old name "Terminus" and doesn't work unless it's revised to "xos4 Terminus". I think I'm just nuking that font-config directory, apparently it's purpose is to prevent fontconfig from actually working.
Last edited by Trilby (2017-10-08 16:25:17)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I had - following the wiki - enabled several configs by creating links under /etc/fonts/conf.d to config files in /etc/fonts/conf.avail. One of these was 70-no-bitmaps.conf which prevents fc-match from finding any bitmapped fonts even when they are specifically requested. I also had 75-yes-terminus.conf, but this has the old name "Terminus" and doesn't work unless it's revised to "xos4 Terminus". I think I'm just nuking that font-config directory, apparently it's purpose is to prevent fontconfig from actually working.
in my "/etc/fonts/conf.d/" directory, there is NO link to "70-no-bitmaps.conf"
but I have a link to "75-yes-terminus.conf"
inside this file there si the line:
<patelt name="family"><string>Terminus</string></patelt>so you do not have to change this to "xos4 Terminus".
I use Terminus for dwm and st. it works just fine.
Well, in the "config.h" of dwm you have to actually use "xos4 Terminus".
Last edited by dlz (2017-10-08 16:34:48)
Offline
diz, that 75-yes-terminus.conf only server as an exception to the 70-no-bitmaps. Essentially the latter blocks all bitmap fonts, and the former allows "Terminus" in as an exception to that. But now that 75-yes-terminus is completely ineffective: without 70-no-bitmaps it doesn't matter, but with 70-no-bitmaps it fails to properly provide an exception (as "Terminus" is no longer the correct name).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
you could just start st with -f xos4\ terminus-18
Offline
ubone, please actually read the thread, that would not have worked at all. But regardless this was solved over six months ago. Do not necrobump particularly solved threads.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed