points, pixels, fonts and pango



Hi,

I'm trying to get my head around computing a font size that I should use to
fill in a box, so the letters actually fit into that box.

I know the height of the box, in pixels. From what I understood, the font point
is 1/72 of an inch. My display shows 75 dpi as it's vertical resolution. Which
makes my pixel to be almost a point (96% of a point).

But, somehow, if I set the absolute font size to be 25 pixel font, it gives me
27.5 ascent and 7.2 descent values.

So, I guess, that's what I don't know:

- is ascent/descent returned in points or pixels ? (I think it's points)

- what is the Pango font size, and is it portable across rendering engines ?
  Now, that really to me seems to be a very basic question that I can't find
  any easy answer for :). The common definition of a font size seems to vary
  from a measurement of a specific letter, to the actual distance between max
  ascent and max descent. Pango's font size doesn't seem to be the later at
  least...

Thanks !
  Pawel.

Bye.
--
 Pawel S. Veselov [vps], Sun Microsystems, Inc.
 Senior Staff Engineer, Consumer and Mobile Systems group.    __ __(O) _ __
   (408) 276-5410   e-mail: Pawel Veselov Sun COM             \ V /| || '  \
fax(408) 276-6090 HomePage: http://manticore.2y.net            \_/ |_||_|_|_|




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