[Xquartz-dev] Server side fonts

Jeremy Huddleston jeremyhu at apple.com
Wed May 5 18:59:23 PDT 2010


On May 5, 2010, at 13:45, Peter Dyballa wrote:

> Hello!
> 
> X clients can either use fonts supplied via libfontconfig or request them from the X server. The X server is configured like this:
> 
> 	checking for root directory for font files... /opt/local/share/fonts
> 	checking for directory for misc files... ${FONTROOTDIR}/misc
> 	checking for directory for OTF files... ${FONTROOTDIR}/OTF
> 	checking for directory for TTF files... ${FONTROOTDIR}/TTF
> 	checking for directory for Type1 files... ${FONTROOTDIR}/Type1
> 	checking for directory for 75dpi files... ${FONTROOTDIR}/75dpi
> 	checking for directory for 100dpi files... ${FONTROOTDIR}/100dpi
> 	checking for ${prefix}/etc/X11/fontpath.d... no
> 	checking for default font path... ${FONTROOTDIR}/misc/,${FONTROOTDIR}/TTF/,${FONTROOTDIR}/OTF/,${FONTROOTDIR}/Type1/,${FONTROOTDIR}/100dpi/,${FONTROOTDIR}/75dpi/,/Library/Fonts,/System/Library/Fonts
> 
> Xfontsel uses the X server. When I select "apple" as foundry, i.e., I select fonts from /Library/Fonts or /System/Library/Fonts (why is there no ~/Library/Fonts?)

Because ~/Library/Fonts is different for every user, and the server doesn't support this.  It is added in xinitrc:

/opt/X11/lib/X11/xinit/xinitrc.d  $ cat 10-fontdir.sh 
if [ -x /opt/X11/bin/xset ] ; then
        fontpath="/opt/X11/lib/X11/fonts/misc/,/opt/X11/lib/X11/fonts/TTF/,/opt/X11/lib/X11/fonts/OTF,/opt/X11/lib/X11/fonts/Type1/,/opt/X11/lib/X11/fonts/75dpi/:unscaled,/opt/X11/lib/X11/fonts/100dpi/:unscaled,/opt/X11/lib/X11/fonts/75dpi/,/opt/X11/lib/X11/fonts/100dpi/"

        [ -e "$HOME"/.fonts/fonts.dir ] && fontpath="$fontpath,$HOME/.fonts"
        [ -e "$HOME"/Library/Fonts/fonts.dir ] && fontpath="$fontpath,$HOME/Library/Fonts"
        [ -e /Library/Fonts/fonts.dir ] && fontpath="$fontpath,/Library/Fonts"
        [ -e /System/Library/Fonts/fonts.dir ] && fontpath="$fontpath,/System/Library/Fonts"

        /opt/X11/bin/xset fp= "$fontpath"
        unset fontpath
fi

> , it crashes.

What is the error?

Tom already mentioned this to you, but it sounds like http://xquartz.macosforge.org/trac/ticket/325

> It looks to me as if the X server cannot deliver fonts derived from OT fonts. It even often crashes when I select such a font from its names display...

by "it", I assume you mean the client, not the server... right?





More information about the Xquartz-dev mailing list