Re: character width
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Maximo Pech <makz linuxmail org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: character width
- Date: Sun, 3 Oct 2004 22:43:10 +0200
On Sun, Oct 03, 2004 at 02:23:24PM -0600, Maximo Pech wrote:
how can i get the width of a char in pixels? this is depending on the font i'm using of course.
With
pango_layout_get_pixels_extents(layout,
&physical_rectangle,
&logical_rectangle);
on a Pango layout containing the character in question and
then
physical_rectangle.width
logical_rectangle.width
depending on whether you are interested in logical character
boundary or boundary of area contatining the glyph (ink
boundary).
Well, I assume you use Pango to render text; if you don't
you'd better give more information if you want a reasonable
answer.
Yeti
--
Dynamic IP address is not a crime.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]