Help understanding Pango layout metrics



Hello!

I was recently confused by the metrics involved in laying out text
with Pango and Cairo.

What I needed and expected was a way to specify the size and family of
the font and the height of the lines and then have the text rendered
accordning to those specifications. However I was very confused by the
concept of line spacing and the absence of a line height property.

When I found the line spacing property I assumed that the _heigh_ of
the lines always was identical to the size of the font, however this
apperas not to be so. I am very accustomed to the concept of
line-height and font-size from CSS, perhaps that's why I find the
Pango counterparts difficult to grasp.

Could someone please elaborate on how I can most easily control the
height of the lines in a Pango layout?

What I want is a way to control the exact distance between the
baselines of each line of text in a layout and perhaps the position of
the baseline relative to each line.

/Martin


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