Hello, McClimmers,
I run Debian GNU/Linux, mostly "stable", some "testing". I'm using SBCL.
I followed the instructions here (http://mcclim.cliki.net/GettingStarted) and got clean compiles on everything. (Well, I never got the debugger, at least, so I assume they were clean. :)
The clim demo fails with some kind of font problem:
- (clim-demo::run-test 'clim-demo::demodemo)
Received CLX NAME-ERROR in process "#<CLIM-CLX::CLX-PORT :HOST "localhost" :DISPLAY-ID 0 {C8B6749}>'s event process."
debugger invoked on a XLIB:NAME-ERROR in thread #<THREAD "#<CLIM-CLX::CLX-PORT :HOST "loc alhost" :DISPLAY-ID 0 {C8B6749}>'s event process." {BAE9961}>: Asynchronous NAME-ERROR in request 36 (last request was 37) Code 45.0 [OpenFont] Received CLX FONT-ERROR in process "initial process"
debugger invoked on a XLIB:FONT-ERROR in thread #<THREAD "initial thread" {A7BD4A1}>: FONT-ERROR in current request Code 47.0 [QueryFont] ID #x5E00019
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level.
(XLIB::X-ERROR XLIB:FONT-ERROR :DISPLAY #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R70101000)> :ERROR-KEY XLIB:FONT-ERROR :ASYNCHRONOUS NIL :CURRENT-SEQUENCE 37 :RESOURCE-ID 98566169 :MAJOR 47 :MINOR 0 :SEQUENCE 37) 0] 0
I *think* this is the relevant part of the backtrace:
3: (XLIB::REPORT-ERROR #<XLIB:DISPLAY localhost:0 (The X.Org Foundation R70101000)> 7 XLIB:FONT-ERROR :ASYNCHRONOUS NIL :CURRENT-SEQUENCE 400 :RESOURCE-ID 98566169 :MAJOR 47 :MINOR 0 :SEQUENCE 400) 4: (XLIB::READ-REPLY #<unavailable argument> #<unavailable argument>) 5: (XLIB::QUERY-FONT #<XLIB:FONT -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1 localhost:0 98566169>) 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") 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) 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>)
So I guess
#<CLIM:STANDARD-TEXT-STYLE :SANS-SERIF :ROMAN :HUGE>
gets transformed into
-adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1
but I don't actually have that font on my system:
% xlsfonts | grep -e -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1 %
Any advice? (Hopefully other than "install -adobe-helvetica-medium-r-normal--24-173-100-100-p-0-iso8859-1". :)
Thanks!
-- Larry Clapp
Larry Clapp larry@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...)
Cheers,
Christophe
On Fri, Apr 06, 2007 at 07:51:53AM +0100, Christophe Rhodes wrote:
Larry Clapp larry@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
Larry Clapp wrote:
On Fri, Apr 06, 2007 at 07:51:53AM +0100, Christophe Rhodes wrote:
Larry Clapp larry@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."
Have you tried using either of the freetype backends? There's an sbcl-specific one that most people use and, because I don't use SBCL all the time, I contributed a CFFI one that's mostly a thin modification of the SBCL backend.
Best, R
Quoting Larry Clapp (larry@theclapp.org):
... 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.
As a workaround, you might be able to select a different font. Try changing clim-clx::*clx-text-family+face-map* so that it uses some other font family. Perhaps there are fonts that just work for you.
d.
"lc" == Larry Clapp larry@theclapp.org writes:
lc> % xlsfonts | grep adobe-helvetica-medium-r-[^-]*-[^-]*-24- lc> -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso10646-1 lc> -adobe-helvetica-medium-r-normal--24-240-75-75-p-130-iso8859-1 lc> lc> Why would xlib:list-font-names return a font that I don't actually lc> have installed, when two fonts that I *do* have installed match the lc> given pattern?
I believe that the problem you describe is due to a bug in Xorg
http://article.gmane.org/gmane.lisp.lispworks.general/5285
but maybe it's up to applications to understand the font size of 0 as an indication that the font is scalable, so to ask for it at some other size.