[mcclim-devel] clim-demo::demodemo fails with some kind of font problem
Larry Clapp
larry at theclapp.org
Fri Apr 6 11:55:07 UTC 2007
On Fri, Apr 06, 2007 at 07:51:53AM +0100, Christophe Rhodes wrote:
> Larry Clapp <larry at theclapp.org> writes:
> > Any advice? (Hopefully other than "install
> > -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1".
> > :)
>
> Actually, I think that probably /is/ the advice, at least for
> starters, but I think I can narrow down the hunt by telling you that
> you probably need to install gsfonts-x11. You might also need to
> run "xset fp rehash"; at least, last time I installed that package
> the postinst script didn't quite get things set up right.
> (Restarting X is also an option, if an undesireable one...)
Thanks, Christophe. "apt-get install gsfonts-x11" says "gsfonts-x11
is already the newest version."
By my reading of the tracelog and the code, here's the call sequence:
8: (CLIM-CLX::TEXT-STYLE-TO-X-FONT
#<CLIM-CLX::CLX-PORT :HOST "localhost" :DISPLAY-ID 0 {C8B6749}>
#<CLIM:STANDARD-TEXT-STYLE :SANS-SERIF :ROMAN :HUGE>)
Backends/CLX/port.lisp: text-style-to-x-font calls ...
7: ((SB-PCL::FAST-METHOD CLIM:TEXT-STYLE-MAPPING (CLIM-CLX::CLX-PORT T))
#<unavailable argument>
#<unavailable argument>
#<CLIM-CLX::CLX-PORT :HOST "localhost" :DISPLAY-ID 0 {C8B6749}>
#<CLIM:STANDARD-TEXT-STYLE :SANS-SERIF :ROMAN :HUGE>
NIL)
... Backends/CLX/port.lisp: text-style-mapping, which calls
Backends/CLX/port.lisp: open-font, which for some reason is not listed
in the backtrace.
Here's open-font:
(defun open-font (display font-name)
(let ((fonts (xlib:list-font-names display font-name :max-fonts 1)))
(if fonts
(xlib:open-font display (first fonts))
(xlib:open-font display "fixed"))))
font-name should look like
"-adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*".
xlib:list-font-names looks like it's supposed to return at most one
font that matches that pattern (I'd assume some *installed* font, but
apparently not!). For unknown reasons xlib:list-font-names returns
-adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1, and
open-font calls xlib:open-font on that font:
6: (XLIB:OPEN-FONT
#<XLIB:DISPLAY localhost:0 (The X.Org Foundation R70101000)>
"-adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1")
and that fails.
So ... any help? It looks like if I could build a good proof-of-bug
if I knew how to connect to the display. Some poking around leads me
to:
* (let ((display (xlib:open-display "localhost")))
(print
(xlib:list-font-names display
"-adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-*"
:max-fonts 1))
(xlib:close-display display))
("-adobe-helvetica-medium-r-narrow--24-173-100-100-p-0-iso8859-1")
Here are my -adobe-helvetica-medium-r-*-*-24-*-*-*-*-*-*-* fonts:
% xlsfonts | grep adobe-helvetica-medium-r-[^-]*-[^-]*-24-
-adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso10646-1
-adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1
Why would xlib:list-font-names return a font that I don't actually
have installed, when two fonts that I *do* have installed match the
given pattern?
Thanks again for any help!
-- Larry Clapp
More information about the mcclim-devel
mailing list