Difference in rendering xft fonts in xorg-server and XQuartz.app

Richard Cobbe rcobbe at pobox.com
Tue May 28 16:19:12 UTC 2019


On Tue, May 28, 2019 at 09:53:54AM -0400, Richard L. Hamilton wrote:

> > I don't know where X11 or its terminal stores its font settings...
> >
>
> Native macOS font locations:
> ~/Library/Fonts/
> /Library/Fonts/
> /Network/Library/Fonts/
> /System/Library/Fonts

The desired font is a truetype, stored in ~/Library/Fonts/Microsoft, which
I created myself, and this could easily be the problem.  There is a
fonts.dir in that directory, but the directory is naturally not listed as
part of the font path when I run `xset q`.  (Interestingly, neither is
~/Library/Fonts, although /Library/Fonts and /System/Library/Fonts are both
present.)

I'm fairly sure that rxvt uses fontconfig, so I checked out
/opt/local/etc/fonts, and there too I see /Library/Fonts,
/Network/Library/Fonts, and /System/Library/Fonts, but not
~/Library/Fonts, and certainly not ~/Library/Fonts/Microsoft.

Once I get home from work this evening and have a bit more time, I'll try
copying the font into /Library/Fonts, or possibly tweaking the font paths,
and see what happens.

<SNIP lots of really good information about mkfontdir and fontconfig>

Thank you for providing this detail!  As I said elsewhere in the thread,
modern X11 font management is a mystery to me, and this helps to clear up a
great deal of that.  The last time I really got into this stuff in detail
(ah, the bad old days of XFree86), font specifications tended to look like

    -*-fixed-medium-r-*-*-15-*-*-*-*-*-iso8859-*

so it's been a while, and a lot's changed since then!  :-)

> Individual X11 apps may have different ways of specifying which fonts
> they use. Xt based apps will probably have entries in resource files, for
> example /opt/local/share/X11/app-defaults/XTerm, or in loaded resources
> (output of xrdb -q, generally initialized from ~/.Xdefaults). Qt and gtk
> toolkits have their own configuration mechanisms.

Right; this part I'm fairly familiar with, at least for Xt apps.  Normally
I rely on a line in ~/.Xresources to set the font for this particular
client, but for the purposes of this investigation, I commented that out,
reloaded the resource database, and fell back on the command-line option in
my original message.

Thanks again!

Richard


More information about the macports-users mailing list