2 ;;;; Last minute patches
5 ;; from http://paste.lisp.org/display/6063, to allow SBCL to display
6 ;; non-ASCII characters via CLX
9 (defun translate (src src-start src-end afont dst dst-start
)
10 (let ((min-char-index (xlib:font-min-char afont
))
11 (max-char-index (xlib:font-max-char afont
)))
13 (loop for i from src-start below src-end
15 for index
= (char-code (aref src i
))
16 while
(<= min-char-index index max-char-index
)
17 do
(setf (aref dst j
) index
)
19 (loop for i from src-start below src-end
21 for index
= (if (characterp (aref src i
)) (char-code (aref src i
)) (aref src i
))
22 while
(<= min-char-index index max-char-index
)
23 do
(setf (aref dst j
) index
)
24 finally
(return i
)))))