You are not logged in.

#1 2022-11-13 21:50:28

Eragon615
Member
Registered: 2021-09-21
Posts: 13

X11 settings on a modern system

Can someone explain to me how X11 settings get populated on Arch, specifically the font paths? I use x3270 which needs it's fonts added to the font path. I know I can just do xset fp+ /path/to/x3270/fonts and I could even add that to my zsh.rc, but I'd love to know how Arch is setting the default of /usr/share/fonts/TTF, and after installing xorg-fonts-100dpi it sets /usr/share/fonts/100dpi. I don't see anything in /etc/X11/xorg.conf.d nor do I see anything setting it in the defaults in /usr/share/X11/xorg.conf.d.

Thanks in advance.

Offline

#2 2022-11-13 22:34:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: X11 settings on a modern system


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-11-13 22:46:34

Eragon615
Member
Registered: 2021-09-21
Posts: 13

Re: X11 settings on a modern system

Okay, I was looking in the Xorg part of the wiki, specifically here: https://wiki.archlinux.org/title/xorg#Program_requests_%22font_'(null)'%22

But this still doesn't answer my question. Doing an xset fp+ /path/to/font only persists until a reboot occurs. Does that mean that somewhere in Arch's start up, it's running those commands everytime? I did try using the mkfontdir and mkfontscale commands but they didn't do anything noticeable.

Offline

#4 2022-11-13 23:03:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: X11 settings on a modern system

Please read the linked section which - while quite short - goes beyond those two commands.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-11-13 23:12:15

Eragon615
Member
Registered: 2021-09-21
Posts: 13

Re: X11 settings on a modern system

Hmm... Either I'm dumb, or I'm not phrasing my question correctly. I understand that I can use xset fp+ /path/to/fonts and I understand that you can use a .conf file in say, /etc/X11/xorg.conf.d with font paths. So I know several ways to make those fonts work. But where I'm lost is, how is Arch doing this by default? I don't see a single .conf file with a FontPath section, so unless there's an xset fp+ /path/blah/blah somewhere buried in some startup script, I'm really at a loss as to how the default of /usr/share/fonts/TTF is getting set. And when I installed the 100dpi fonts, they also got set (after a relog). I even listed the package in pacman to see if it was adding a .conf file somewhere, but it's not. How is it getting set?

Offline

#6 2022-11-14 07:23:06

seth
Member
Registered: 2012-09-03
Posts: 51,028

Re: X11 settings on a modern system

There's a difference between X11 fonts and fontconfig and also the server has built-in font paths.

https://wiki.archlinux.org/title/Font_c … Font_paths

The font paths initially known to Fontconfig are: /usr/share/fonts/, ~/.local/share/fonts (and ~/.fonts/, now deprecated). Fontconfig will scan these directories recursively

https://man.archlinux.org/man/extra/xor … n#FontPath

When this entry is not specified in the config file, the server falls back to the compiled-in default font path, which contains the following font path elements (which can be set inside a catalogue directory):

/usr/share/fonts/X11/misc/
/usr/share/fonts/X11/TTF/
/usr/share/fonts/X11/OTF/
/usr/share/fonts/X11/Type1/
/usr/share/fonts/X11/100dpi/
/usr/share/fonts/X11/75dpi/

If you want the server to be aware of font paths for clients that don't use fontconfig, you'll have to add those paths to the server configuration.

Online

Board footer

Powered by FluxBB