From: Tim D. <tw...@do...> - 2010-10-06 13:35:58
|
On 27/09/10 08:08, Axel Simon wrote: > There is a demo in the pango package which renders some text using > Cairo. The key is 'showLayout' which renders a PangoContext in a Cairo > Render monad. Actually, I've one more question on this. I need to find out the width and height of string as it will be rendered by "showLayout". In the basic cairo font api, I write: -- | Return the bounding rectangle for a text string rendered -- in the current context. textSize :: String -> CRender RectSize textSize s = c $ do te <- C.textExtents s fe <- C.fontExtents return (C.textExtentsWidth te, C.fontExtentsHeight fe) What are the equivalent functions in the pango world? Thanks, Tim |