Re: Non-ascii characters break Cairo's show_text

muppet kirjoitti:
You shouldn't need to parse anything.  gtk_font_selection_get_font_name()
creates its result by calling pango_font_description_to_string(), so on your
end it should be as simple as

  $font_name = $font_selection->get_font_name ();
  $font_desc = Gtk2::Pango::FontDescription->from_string ($font_name);
  $layout->set_font_description ($font_desc);

Thanks. This works and simplifies things greatly. I was first using $cr->select_font_face, which requires family, slant and weight separately.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]