[cairo] 回复: How to show chinese text using cairo

快乐2013 350137278 at qq.com
Mon May 6 06:13:51 PDT 2013

Hi, what I have my code as below:

   cairo_select_font_face (cr, "Arial Unicode MS", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
   cairo_set_font_size (cr, 32.0);
   cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
   cairo_move_to (cr, 10.0, 50.0);
    cairo_show_text (cr, "Hello, 中国人  "); // this clause cannot work

I wonder if the following can work at all.

    // does this clause can work?
    cairo_show_text (cr, toUtf8("Hello, 中国人  "));

here toUtf8 is a functioin doing convertion from ansi to utf8

------------------ 原始邮件 ------------------
发件人: "caozp"<caozp at qq.com>;
发送时间: 2013年5月6日(星期一) 晚上9:09
收件人: "快乐2013"<350137278 at qq.com>; 

主题: Re: [cairo] How to show chinese text using cairo

ansitoutf8 网上搜一搜。

发自我的 iPhone

在 2013-5-6,20:59,"快乐2013" <350137278 at qq.com> 写道:

Anyone know about how to show unicode text such as chinese word using cairo on win7?
cairo mailing list
cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130506/1c5df432/attachment.html>

More information about the cairo mailing list