Calculating bounding boxes for rendered fonts
- From: "Ian King [ES]" <king eiffel com>
- To: gtk-list gnome org
- Subject: Calculating bounding boxes for rendered fonts
- Date: Tue, 25 May 2004 16:25:43 -0700
Hi,
I need to be able to correctly calculate a bounding box for a string in
a particular rendered font. At the moment I am creating a PangoLayout
with a particular string and font description, then calling
pango_layout_get_pixel_size. This seems to work when the rendered font
is non-italic. However, when I italicize the font description, the
query to pango_layout_get_pixel_size returns the same value, even though
the rendered font is wider than the returned dimensions.
Is there a way to accurately query the size of a rendered string so that
I can return a bounding box that covers the entire font regardless of
whether it is italicized or not.
Thanks for your time
Ian King
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]