Re: Calculating bounding boxes for rendered fonts
- From: Jan-Marek Glogowski <glogow fbihome de>
- To: "Ian King [ES]" <king eiffel com>
- Cc: gtk-list gnome org
- Subject: Re: Calculating bounding boxes for rendered fonts
- Date: Wed, 26 May 2004 02:37:39 +0200 (CEST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]