|
From: Axel S. <Axe...@en...> - 2009-01-30 13:47:49
|
On Fri, 2009-01-30 at 14:20 +0100, Peter Verswyvelen wrote: > I'm trying to change the FontOptions in a PangoContext using > > Graphics.UI.Gtk.Cairo.cairoContextSetFontOptions:: PangoContext -> > FontOptions -> IO () > > However, all the FontOptions stuff is inside the Render monad. Yes, it seems that this is unnecessary. We could probably generalise the types to be MonadIO m => ... -> m (). This way, the functions would be backwards compatible. > Therefore it seems I first need a surface before I can actually change > anything in the FontOptions, although clearly the FontOptions have > nothing to do with surfaces? A surface has a default FontOptions structure, but that's about it. So, yes the FontOptions structure is totally separate. > So I could create a dummy image surface for doing this, but this feels a bit... > > So is it possible to run the Render monad *without* a surface? Or do > the FontOptions functions need a surface? If they don't, then maybe > these functions don't belong in the Render monad? The latter. > Also, it seems the FontOptions have no effect on the "toy API" > textPath function. > > Since I only need the toy API functionality, is it possible to make > the font options apply to the "toy API" too? I think this is due to our incomplete binding. What we're missing seems to be the function "cairo_set_font_options" which would be called setFontOptions in Haskell. We have setFontMatrix, but we lack the anything to actually apply the font options again. These changes won't be big, but I don't know if its too late to into the release. Pete? Axel. |