Re: [Gnome-print] Other question, How get the height of a text?



Hello,

You can always find font global ascender and descender from GnomeFont
struct. If you want to be more precise, use glyph ascenders and descenders
and find max. But if you need really visually pleasing printout, you have
to adjust these by hand anyways.

Also I hope that GnomeFont internals will soon be hidden and there will be
a bunch of more meaningful access functions. Until then, use those and be
prepared ;)

Lauris

On Wed, 7 Jun 2000, Carlos Perelló Marín wrote:

> Hello again.
> 
> 
> What i must do to get the height of a text. I select a font and a
> size, i can get its width, but
> i don't know how get its height. How i could get it?. I need it to
> print three objects.
> 	First a line.
> 	After a Word.
> 	And at the end another line.
> 
> 
> Something like:
> 
> 		----------------
> 		Hello World
> 		----------------
> 
> But i need to know the size of the text "Hello World" to calculate the
> second line coordinate.
> 
> Thanks in advance.
> 
> 
> 





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