Re: Calculating bounding boxes for rendered fonts
- From: Sven Neumann <sven gimp org>
- To: John Cupitt <john cupitt ng-london org uk>
- Cc: "Ian King \[ES\]" <king eiffel com>, gtk-list gnome org
- Subject: Re: Calculating bounding boxes for rendered fonts
- Date: 26 May 2004 10:30:05 +0200
Hi,
John Cupitt <john cupitt ng-london org uk> writes:
> I'm using
>
> pango_layout_get_extents( layout, &ink_rect, &logical_rect );
>
> ink rect is the bounding box of the pixels that will be painted,
> logical_rect includes a bunch of extra spacing and allowance for
> ascenders / descenders / extra punctuation / other stuff I don't
> understand. PANGO_PIXELS() converts to pixel coordinates.
There's also pango_layout_get_pixel_extents() so you don't really need
to use PANGO_PIXELS(). Also, watch out, the ink rect may sometimes
extend the logical rectangle.
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]