Maximum height of line of text in Pango



Hi,

how can I efficiently obtain the minimum height in pixels which is guaranteed to cover a text line in a given font?

Basically, I need something like

(metrics.get_ascent() + metrics.get_descent()) / pango.SCALE

where metrics is a pango.FontMetrics. Unfotunately, the operation given above takes ages to compute and is thus not feasible in the context of drawing a widget to the screen.

Any ideas? Thank you in advance

Dominique



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