[Gtk-sharp-list] Cairo UTF8 text problem

mkbosmans mkbosmans at gmail.com
Tue Apr 7 04:41:12 EDT 2009



Artur Silic wrote:
> 
>             cr.SelectFontFace("Sans", FontSlant.Normal, FontWeight.Bold);
>             cr.SetFontSize(x1);
>             cr.ShowText("ćuprija na đipu");
> 

You're using the Cairo "toy font api". The font-related methods on
Cairo.Context are only for some quick-n-dirty font display. For any serious
font display with Cairo (which includes the layout of whole paragraphs and
the use of the more advanced Unicode/font capabilities, such as fallbacks)
you are supposed to use Pango. See Pango.Layout and Pango.CairoHelper in the
docs for more info.

Displaying the same text witrh Pango+Cairo is a bit more work and a few
lines of code more, but in return you get back a lot of possibilities.

Maarten
-- 
View this message in context: http://www.nabble.com/Cairo-UTF8-text-problem-tp22913055p22924631.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list