On May 5, 2010, at 18:59:23 PDT, Jeremy Huddleston wrote:
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?

I can also reproduce this on 10.5.8 with the 2.5.0 install.

Just start xfontsel, pick apple as the foundry then xfontsel exits immediately with:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  45 (X_OpenFont)
  Value in failed request:  0x400049
  Serial number of failed request:  2081
  Current serial number in output stream:  2082

Which looks like ticket 325 that's mentioned above except this is happening on Leopard with X11 2.5.0 installed.
I also get the same error when picking monotype as the foundry.

Kyle