Exactly. thanks!
Jefferson Heard wrote:import Foreign.C
Oh, and I should say the function I want to implement is
getFontBBox :: Font -> String -> IO [Float]
I do know how to marhsal/unmarshal the String. Just not the CFloat array to Haskell [Float]
import Foreign.Ptr
import Foreign.Marshal.Array
import Control.Applicative((<$>))
oneway :: Ptr CFloat -> IO [Float]
oneway p = map real2Frac <$> peekArray 4 p
the other way you would probably want withArray, but I think this is the way you need?