On Thu, 12 Dec 2024 at 07:13, Chris Green <[email protected]> wrote: > On Thu, Dec 12, 2024 at 06:14:30AM +1100, Brendan O'Dea wrote: > > On Wed, 11 Dec 2024 at 21:49, Chris Green <[email protected]> wrote: > > > Is there any reason to choose either 75dpi or 100dpi fonts for use > > > with xvile?
To your original question: it is complicated. The DPI in the font string (XLFD) actually specifies the resolution that the font was designed for, specifically with respect to the point size in that string. i.e. if you theoretically had a monitor which actually displayed 100 dots per inch, then a 12 point 100dpi bitmap font would appear the same as a printed 12 point font. In practice, most monitors are not actually either 75 or 100 DPI, but somewhere in between for older monitors, and larger for 4K monitors. So neither is going to be "correct", hence just pick the one you like the size of and run with it. The 75dpi variant of two fonts of the same point size will just appear to be three quarters the size of the 100dpi variant. Making apps work with 4K can be a bit tricky, particularly since Debian just sets the DPI of the X server to 96 regardless of what it actually is. I found that I needed to tweak a fair few things to get stuff working at a reasonable size for me. Some relevant bits from .Xresources: XTerm.vt100.faceName: Hack XTerm.vt100.faceSize: 9 Xft.dpi: 158 Xcursor.size: 32 You could try something like this for xvile (I don't actually use it, tend to use vile in a terminal): XVile.font: -b&h-lucidatypewriter-bold-r-normal-sans-20-140-100-100-m-120-iso10646-1 XVile*menubar*font: -b&h-lucida-medium-r-normal-sans-20-140-100-100-p-114-iso10646-1 I also pass these flags to chrome: --high-dpi-support=1 --force-device-scale-factor=1.4 There is some more useful information here: https://wiki.debian.org/MonitorDPI > > The font that you end up with using a short name like "8x13" or > > "lucidasans-bold-12" will be determined by which fonts.alias file > > comes first in the path that you see in the output of the above > > command. > > > OK, thanks, so basically there's not much sense to it! ... but I > could change which gets chosen by default by changing the font path, > wherever that gets set. You can change the font path at run-time with xset, or by adding an appropriate xorg.conf fragment into /etc/X11/xorg.conf.d, but it's not really worth the effort. Better to just specify the full font string, since those aliases all appear to resolve to the iso8859-1 charset, and in 2024 you probably want to be using iso10646-1 (unicode) and a UTF-8 locale. Which reminds me, I probably should update the xvile app-defaults shipped with Debian. I find that the best way to find that string is to use: xlsfonts -fn '-*-*-medium-r-normal-*-*-*-100-100-c-*-iso10646-1' xlsfonts -fn '-*-*-medium-r-normal-*-*-*-100-100-m-*-iso10646-1' to find what is available (fixed pitch fonts: cell and monospaces resp.), then paste a string from the list into this: xterm -fa '' -fn '<font-string>' in the case of strings which have zeros in the three fields around -100-100-m-, that is a scalable font which you can just change the second zero to a number of your choice to choose a point size. Alternatively, you could find the short name you liked in fonts.alias, and s/8859/10646/ in the full font name, or of course if you don't care about UTF-8, then continue to use the short names. --bod
