Re: Calculating bounding boxes for rendered fonts

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

 



Hi Ian

Have you really rendered the font? I just checked with my application and
everything works as expected when changing the font via font name. (Gtk+
2.4.1 et al).

I'm using the following code:

desc = pango_font_description_from_string(font_str);
if (desc != NULL) {
	old_desc = pango_context_get_font_description
		(pango_layout_get_context(STATUS->text_layout));
	if (!pango_font_description_equal(desc, old_desc)) {
		pango_context_set_font_description
			(pango_layout_get_context(STATUS->text_layout), desc);
		pango_layout_context_changed(STATUS->text_layout);
	}
	else { pango_font_description_free(desc); }
}

HTH

Jan-Marek
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux