[magick-users] UTF-8 and X11 iso10646-1 fonts using C++ API on linux

Greg Denton greg.denton at gmail.com
Wed Feb 4 09:43:07 PST 2009


..er..I didn't mention ISO-8859. How is UTF-8 supported with fonts?
Which API's and fonts should be used? In particular, on a linux box
(CentOS 5.2)?

I assumed the iso10646-1 fonts would work as they seemed to be
designed for UTF-8.

Thanks.

On Mon, Feb 2, 2009 at 7:18 PM, Anthony Thyssen
<A.Thyssen at griffith.edu.au> wrote:
> On Mon, 2 Feb 2009 09:36:23 -0800
> magick-users-bounces at imagemagick.org wrote:
>
> | Still looking for any info on UTF-8 font support. Thanks.
> |
> | On Mon, Jan 19, 2009 at 5:29 PM, Greg Denton <greg.denton at gmail.com> wrote:
> | > Trying to write UTF-8 text to an image without any luck. I've spent
> | > several hours reading docs and googling.
> | >
> | > /usr/bin/xlsfonts shows:
> | > ...
> | > -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso10646-1
> | > -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
> | > ...
> | >
> | > (BTW, this seems like an excellent page for these fonts:
> | > http://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html)
> | >
> | > program has:
> | > img.font("-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso10646-1");
> | > img.textEncoding("UTF-8");
> | > img.annotate(s, Magick::Geometry(0, 0, x, y));
> | >
> | > The string "s" has the UTF-8 "cent" sign (0xC2, 0xA2), but it shows as
> | > 2 chars, per ISO 8859.
> | >
> | > My guess is that textEncoding does not work with the X11 bitmapped
> | > fonts, but I can't find anything at all on the web (should be some
> | > discussion somewhere).
> | >
> | > Is there any way to do UTF-8 with the X11 bitmapped fonts? Thanks.
> | >
>
> It works with UTF-8  but not with the ISO-8859 character set which is
> different!
>
>
>  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
>  -----------------------------------------------------------------------------
>        How many programmers does it take to change a light bulb?
>                  None.  It's a hardware problem.
>  -----------------------------------------------------------------------------
>     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
> _______________________________________________
> Magick-users mailing list
> Magick-users at imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick-users
>


More information about the Magick-users mailing list