[cl-gd-devel] draw-freetype-string cannot work with utf-8 encoded string
arry
frinkofox at yahoo.com
Wed Feb 28 15:05:55 UTC 2007
Hello,
I confirm this too. This is a bug from quite some time now.
What i did was to change to the older version - there it works!
cheer up
H.T.
Luo Yong <cyberblue.yong at gmail.com> wrote: Hi all
I'm under UTF-8 environment and found that UTF-8 encoded string cannot
be displayed with function draw-freetype-string.I wrote a script like
this
===>
(asdf:oos 'asdf:load-op :cl-gd)
(setq oldimage (cl-gd:create-image 300 150))
(cl-gd:allocate-color 0 0 255 :image oldimage)
(cl-gd:draw-freetype-string 100 100 "ºº×Ö" :font-name
"/usr/share/fonts/truetype/arphic/gbsn00lp.ttf" :color
(cl-gd:find-color 255 255 255 :resolve 't :image oldimage) :image
oldimage :angle 0 :anti-aliased 't)
(cl-gd:write-image-to-file "~/newimage.png" :type :PNG :image oldimage
:if-exists :supersede)
<===
But it displays the UTF-8 string "ºº×Ö" like this:
&27721;&23383
How can I make my script displays the string correctly?
Thanks.
_______________________________________________
cl-gd-devel site list
cl-gd-devel at common-lisp.net
http://common-lisp.net/mailman/listinfo/cl-gd-devel
---------------------------------
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-gd-devel/attachments/20070228/3a48fb6b/attachment.html>
More information about the Cl-gd-devel
mailing list