[cairo] About cairo_show_text and UTF-8...

Scott Robert Ladd graphics at coyotegulch.com
Thu Jan 5 07:21:27 PST 2006


I'm running Cairo 1.0.2 and GTK+ 2.8.9 on a system with LANG=en_US.UTF-8
and LC_ALL=en_US.UTF-8.

In interface components like a GtkLabel, I can include UTF-8 encodings
that display correctly, as in this line of code:

   cos_label = gtk_label_new ("cos <i>\316\270</i>:");
   gtk_widget_show (cos_label);

However, when I try to display the same encoding using cairo_show_text,
I see a rectangle instead of the expected theta character:

     cairo_show_text(drawing_cr, "\316\270");

I am using the system font (Sans) in Cairo.

Am I missing something obvious?

..Scott



More information about the cairo mailing list