Difference in rendering xft fonts in xorg-server and XQuartz.app
Richard L. Hamilton
rlhamil at smart.net
Wed May 29 04:35:06 UTC 2019
Have you tried creating ~/.fonts directory and putting the font(s) in there? Looking at both /opt/local/etc/fonts/fonts.conf and /opt/X11/lib/X11/fontconfig/fonts.conf, I see it listed as one of the directories (although as one that will likely go away in the future, with what per-user alternative, I don't know).
Fontconfig may not care, but I'd do it like this:
mkdir ~/.fonts
then copy the font files into there, and finally
cd ~/.fonts
mkfontscale .
mkfontdir .
That way the directory would also be suitable for adding to the X server font path, e.g.
xset fp+ ~/.fonts
Heck, for non-Macs, ~/Library/Fonts would be unusual, but ~/.fonts would probably be pretty conventional.
> On May 29, 2019, at 00:08, Richard Cobbe <rcobbe at pobox.com> wrote:
>
> On Tue, May 28, 2019 at 09:19:12AM -0700, Richard Cobbe wrote:
>> 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.
>
> This was it. Copying the font files to /Library/Fonts solved the problem
> nicely, and for this particular client app, it's definitely fontconfig's
> path settings, not the X server's.
>
> For a variety of reasons, I'd prefer to keep the font files in
> ~/Library/Fonts rather than copying them to /Library, and I'd also rather
> not put /Users/cobbe/Library/Fonts into a system configuration file. (It'd
> probably be OK in practice, since I'm the only person to use this computer,
> but it still feels really sloppy.)
>
> I looked at the fonts-conf manpage, and although it suggests that it reads
> ~/.fonts.conf, this doesn't appear to actually be the case. It does,
> however, read $XDG_CONFIG_HOME/fontconfig/fonts.conf, and creating that
> file with the appropriate <dir> entry works fine.
>
> Now I just have to figure out how to automatically set XDG_CONFIG_HOME
> before I start X, since I want to start X and urxvt automatically on
> login. That's a separate thread, I think.
>
> Richard
>
More information about the macports-users
mailing list