Re: character width



that's just what i need but, how do i create a pango_rectangle? i cannot find a function to do that in the 
pango documentation.

----- Original Message -----
From: "David Necas (Yeti)" <yeti physics muni cz>
Date: Sun, 3 Oct 2004 22:43:10 +0200
To: Maximo Pech <makz linuxmail org>
Subject: Re: character width

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.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze



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