Skip to content
Snippets Groups Projects
Commit 312975ac authored by cer's avatar cer
Browse files

tk/font.lisp : Check for name being a string

tk/resource.lisp : Convert-resource-out for font-struct handles value being a font object
parent 6663571b
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as ;; 52.227-19 or DOD FAR Supplement 252.227-7013 (c) (1) (ii), as
;; applicable. ;; applicable.
;; ;;
;; $fiHeader: font.lisp,v 1.12 92/05/22 19:26:18 cer Exp $ ;; $fiHeader: font.lisp,v 1.13 92/08/18 17:53:31 cer Exp $
(in-package :tk) (in-package :tk)
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
(defmethod initialize-instance :after ((f font) &key foreign-address display name) (defmethod initialize-instance :after ((f font) &key foreign-address display name)
(unless foreign-address (unless foreign-address
(check-type name string)
(let ((x (x11:xloadqueryfont display name))) (let ((x (x11:xloadqueryfont display name)))
(when (zerop x) (error "Cannot find font: ~S" name)) (when (zerop x) (error "Cannot find font: ~S" name))
(setf (foreign-pointer-address f) x) (setf (foreign-pointer-address f) x)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment