[cl-typesetting-devel] Unicode?

Peter Seibel peter at gigamonkeys.com
Thu Sep 6 21:19:52 UTC 2007


I've got this simple test program which, as you can see, attempts to use 
  one of the LatinModern unicode fonts and tries to render some text 
that contains a unicode emdash (code-point #x2014).

(defpackage :foo (:use :cl :cl-pdf))

(in-package :foo)

(defun test-unicode  (&optional (file #P"foo.pdf"))
   (pdf:with-document ()
     (pdf:with-page ()
       (pdf:with-outline-level ("Example" (pdf:register-page-reference))
	(let ((font (pdf:get-font "LMRoman12-Regular")))
	  (pdf:in-text-mode
	   (pdf:set-font font 14.0)
	   (pdf:move-text 100 800)
	   (pdf:draw-text
              (format nil "This ~c is a test." (code-char #x2014)))))))
     (pdf:write-document file)
     file))


When I run this function in generates a file without error but the 
emdash is nowhere to be seen. Is this a problem with the font (which was 
loaded from an .afm file not a .ufm) or with cl-pdf or with something 
I'm doing wrong?

-Peter

-- 
Peter Seibel                     : peter at gigamonkeys.com
A Billion Monkeys Can't be Wrong : http://www.gigamonkeys.com/blog/
Practical Common Lisp            : http://www.gigamonkeys.com/book/
Coders at Work                   : http://www.codersatwork.com/



More information about the cl-typesetting-devel mailing list