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

Mike Emmel mike.emmel at gmail.com
Thu Jan 5 07:36:13 PST 2006


On 1/5/06, Scott Robert Ladd <graphics at coyotegulch.com> wrote:
> 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?
>
The system font in cairo does not have those glyphs.
Pango uses a collection of fonts to meet the unicode requirements of a string.
Mike

> ..Scott
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>


More information about the cairo mailing list