From rs at natchie.mine.nu Wed Feb 16 20:17:51 2005 From: rs at natchie.mine.nu (Rusty Shackleford) Date: Wed, 16 Feb 2005 15:17:51 -0500 Subject: [cl-gd-devel] Error could not find font Message-ID: <20050216201751.GA8468@mwilson.umlcoop.net> Hi -- I'm new to lisp, so I apologize if this error is obvious. Anyway, I installed the cl-gd debian package, and tried to run the example program posted on the cl-gd website, but I keep getting this "could not find font" error. Here's the exact output of the program: #P"/usr/lib/cl-gd/cl-gd-glue.so" debugger invoked on a SIMPLE-ERROR in thread 8467: Error in FreeType library: Could not find/open font I have the libfreetype6-devel package installed. Do I need to do something with namespaces in my program? All help is welcome! -- Distributed OS wiki: http://en.wikibooks.org/wiki/ComputerScience:Distributed_Systems From edi at agharta.de Wed Feb 16 20:58:51 2005 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Feb 2005 21:58:51 +0100 Subject: [cl-gd-devel] Error could not find font In-Reply-To: <20050216201751.GA8468@mwilson.umlcoop.net> (Rusty Shackleford's message of "Wed, 16 Feb 2005 15:17:51 -0500") References: <20050216201751.GA8468@mwilson.umlcoop.net> Message-ID: Hi! On Wed, 16 Feb 2005 15:17:51 -0500, Rusty Shackleford wrote: > I'm new to lisp, so I apologize if this error is obvious. I don't know if it's obvious but it's not really Lisp-related... :) > Anyway, I installed the cl-gd debian package, and tried to run the > example program posted on the cl-gd website, Which one? The first one called "simple example?" > but I keep getting this "could not find font" error. Looks like you don't have the font that is needed... :) If we're talking about the same example then it uses the "Verdana" font which is part of the "msttcorefonts" Debian package. If you have this package installed you either need to supply a full font path like "/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf" or you have to set the Environment variable DEFAULT_FONTPATH (see the comment in the example). See for all the details. > Here's the exact output of the program: > > #P"/usr/lib/cl-gd/cl-gd-glue.so" > debugger invoked on a SIMPLE-ERROR in thread 8467: > Error in FreeType library: Could not find/open font > > I have the libfreetype6-devel package installed. That should not be necessary. > Do I need to do something with namespaces in my program? Nope. Hope that helps, Edi. From rs at natchie.mine.nu Tue Feb 22 01:48:14 2005 From: rs at natchie.mine.nu (Rusty Shackleford) Date: Tue, 22 Feb 2005 01:48:14 +0000 (UTC) Subject: [cl-gd-devel] Funky compile warnings with (with-thickness ) Message-ID: I'm using (with-thickness (5) to draw some lines, and when I compile the code (in emacs slime with C-c C-k) I get a bunch of messages that look like: ; ==> ; (SB-ALIEN-INTERNALS:%SAP-ALIEN ALIEN ; '#) ; ; note: unable to ; optimize ; because: ; could not optimize away %SAP-ALIEN: forced to do runtime ; allocation of alien-value structure ; compilation unit finished What the heck does this mean? Here's the code that causes the pain: ; This section draws the map. (require "cl-gd") (cl-gd:with-image* (*pngwidth* *pngheight*) (cl-gd:allocate-color 190 190 190) (let ((red (cl-gd:allocate-color 163 83 84)) (green (cl-gd:allocate-color 104 156 84)) (yellow (cl-gd:allocate-color 236 236 236)) (black (cl-gd:allocate-color 0 0 0))) ;; Draw all towns. (dolist (town *towns*) (cl-gd:draw-filled-circle (mapdim (getf town :lat) *pngwidth*) (mapdim (getf town :long) *pngheight*) 20 :color black) ;; Draw roads between neighboring towns. (cl-gd:with-thickness (5) (dolist (neighbor (getf town :neighbors)) (cl-gd:draw-line (mapdim (getf town :lat) *pngwidth*) (mapdim (getf town :long) *pngheight*) (mapdim (getf (town-lookup neighbor *towns*) :lat) *pngwidth*) (mapdim (getf (town-lookup neighbor *towns*) :long) *pngheight*) :color black)))) ;; Draw start town as green circle. (cl-gd:draw-filled-circle (mapdim (getf *start-town* :lat) *pngwidth*) (mapdim (getf *start-town* :long) *pngheight*) 15 :color green) ;; Fill in evaluation function's choices. (dolist (town *path*) (cl-gd:draw-filled-circle (mapdim (getf town :lat) *pngwidth*) (mapdim (getf town :long) *pngheight*) 15 :color yellow)) ;; Draw goal town as red circle. (cl-gd:draw-filled-circle (mapdim (getf *goal-town* :lat) *pngwidth*) (mapdim (getf *goal-town* :long) *pngheight*) 15 :color red)) (cl-gd:write-image-to-file "/var/www/website/draw1.png" :compression-level 6 :if-exists :supersede)) Thanks for the help. From edi at agharta.de Thu Feb 24 18:30:29 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 24 Feb 2005 19:30:29 +0100 Subject: [cl-gd-devel] Funky compile warnings with (with-thickness ) In-Reply-To: (Rusty Shackleford's message of "Tue, 22 Feb 2005 01:48:14 +0000 (UTC)") References: Message-ID: On Tue, 22 Feb 2005 01:48:14 +0000 (UTC), Rusty Shackleford wrote: > I'm using (with-thickness (5) to draw some lines, and when I compile > the code (in emacs slime with C-c C-k) I get a bunch of messages > that look like: > > [...] > > ; could not optimize away %SAP-ALIEN: forced to do runtime > ; allocation of alien-value structure > ; compilation unit finished > > What the heck does this mean? I'm not using SBCL myself but IIRC similar topics came up several times on the SBCL mailing lists so you might want to search gmane.org or ask there. I'm pretty sure they can explain it better than I can... :) Cheers, Edi.