text width

View: New views
4 Messages — Rating Filter:   Alert me  

text width

by Alexander Kresin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

 could someone advise me how to determine the width of
a text string with a selected font ?

 Regards,
 Alexander Kresin
 http://kresin.belgorod.su



               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 
_______________________________________________
gnome-print-list mailing list
gnome-print-list@...
http://mail.gnome.org/mailman/listinfo/gnome-print-list

Re: text width

by Jean Brefort :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le samedi 20 août 2005 à 10:03 -0700, Alexander Kresin a écrit :
> Hi All,
>
>  could someone advise me how to determine the width of
> a text string with a selected font ?

You can use gnome_glyphlist_bbox.


_______________________________________________
gnome-print-list mailing list
gnome-print-list@...
http://mail.gnome.org/mailman/listinfo/gnome-print-list

Re: text width

by Alex Roitman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Aug 20, 2005 at 10:03:48AM -0700, Alexander Kresin wrote:
>
>  could someone advise me how to determine the width of
> a text string with a selected font ?

    font.get_width_utf8(text)

where font is the gnomeprint.Font instance.

Alex

--
Alexander Roitman   http://ebner.neuroscience.umn.edu/people/alex.html
Dept. of Neuroscience, Lions Research Building
2001 6th Street SE, Minneapolis, MN  55455
Tel (612) 625-7566   FAX (612) 626-9201


_______________________________________________
gnome-print-list mailing list
gnome-print-list@...
http://mail.gnome.org/mailman/listinfo/gnome-print-list

signature.asc (196 bytes) Download Attachment

Re: text width

by Richard Boaz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

and if you are accessing pango directly, you can also use the helper
function:

pango_layout_get_pixel_size(layout, &width, &height)

will return the width and height of the string you have drawn to layout,
pretty handy, really.

richard

> Hi All,
>
>  could someone advise me how to determine the width of
> a text string with a selected font ?
>
>  Regards,
>  Alexander Kresin
>  http://kresin.belgorod.su
>
>
>
>
> ____________________________________________________
> Start your day with Yahoo! - make it your home page
> http://www.yahoo.com/r/hs
>
> _______________________________________________
> gnome-print-list mailing list
> gnome-print-list@...
> http://mail.gnome.org/mailman/listinfo/gnome-print-list
>


_______________________________________________
gnome-print-list mailing list
gnome-print-list@...
http://mail.gnome.org/mailman/listinfo/gnome-print-list