Re: Leading Pango Metrics



On Thu, 2016-01-28 at 13:25 +0100, Alex Vazquez wrote:
Hi! I have a question about get metrics of a font.
If I don't understand wrong the height of a font is
ascent+descent+leading.
with pango I can get ascent and descent but i can't get the leading.
I try calculate the leading with  pango_layout_get_spacing() but this
value get me 0.
Also I try get leading with pango_layout_get_pixel_size() but the
result is ascent + descent.
I'm using as a font "Purisa"
Can i calculate the leading of a font using pango ? 

"leading" isn't a property of a font, but rather of how it's used - and
does corresponding to pango_layout_get_spacing().

The standard for computer fonts is that the point size of the font -
say 12pt, is equal to the ascent+descent, and a lot of computer fonts
look pretty good "set solid" without extra leading, at least for short
line lengths.

However, what is a bit confusing is that you actually do end up with
visible space between lines in most cases. If you put a Å directly
underneath a g, they might touch, but if you stick to unaccented
characters, there is a gap between lines.

- Owen



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