[mcclim-cvs] CVS mcclim/Experimental/freetype

dlichteblau dlichteblau at common-lisp.net
Fri Dec 21 15:27:47 UTC 2007


Update of /project/mcclim/cvsroot/mcclim/Experimental/freetype
In directory clnet:/tmp/cvs-serv8013

Modified Files:
	mcclim-freetype.asd 
Removed Files:
	mcclim-freetype-cffi.asd 
Log Message:
Merged mcclim-freetype-cffi.asd into mcclim-freetype.asd.

... use the CFFI code for non-SBCL

... for now, keep the old alien code for SBCL


--- /project/mcclim/cvsroot/mcclim/Experimental/freetype/mcclim-freetype.asd	2007/12/16 20:02:08	1.6
+++ /project/mcclim/cvsroot/mcclim/Experimental/freetype/mcclim-freetype.asd	2007/12/21 15:27:47	1.7
@@ -28,12 +28,17 @@
   "lisp")
 
 (defsystem :mcclim-freetype
-  :depends-on (:clim-clx :mcclim)
+  :depends-on (:clim-clx :mcclim #-sbcl :cffi)
   :serial t
   :components
+  #+sbcl
   ((:file "freetype-package")
    (:uncompiled-cl-source-file "freetype-ffi")
-   (:file "freetype-fonts")))
+   (:file "freetype-fonts"))
+  #-sbcl
+  ((:file "freetype-package-cffi")
+   (:uncompiled-cl-source-file "freetype-cffi")
+   (:file "freetype-fonts-cffi")))
 
 
 ;;; Freetype autodetection
@@ -75,4 +80,16 @@
 
 #-sbcl
 (defmethod perform :after ((o load-op) (s (eql (asdf:find-system :mcclim-freetype))))
-  (warn-about-unset-font-path))
+  (unless
+      (setf (symbol-value (intern "*FREETYPE-FONT-PATH*" :mcclim-freetype))
+	    (find-bitstream-fonts))
+    (warn-about-unset-font-path)))
+
+#-sbcl
+(defun find-bitstream-fonts ()
+  (with-input-from-string
+      (s (with-output-to-string (asdf::*verbose-out*)
+	   (let ((code (asdf:run-shell-command "fc-match -v Bitstream Vera")))
+	     (unless (zerop code)
+	       (warn "~&fc-match failed with code ~D.~%" code)))))
+    (parse-fontconfig-output s)))




More information about the Mcclim-cvs mailing list