From 80b4e9841099ed917abba3d045dcf69e3ee227b2 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 29 Mar 2023 20:39:03 +1300 Subject: [PATCH] Attempt fix regarding fontscale bitsizes. --- Data/Text/Glyphize/Font.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Data/Text/Glyphize/Font.hs b/Data/Text/Glyphize/Font.hs index 211f8e3..22c9c8a 100644 --- a/Data/Text/Glyphize/Font.hs +++ b/Data/Text/Glyphize/Font.hs @@ -660,11 +660,11 @@ fontScale :: Font -> (Int, Int) fontScale font = unsafePerformIO $ withForeignPtr font $ \font' -> alloca $ \x' -> alloca $ \y' -> do hb_font_get_scale font' x' y' - x <- peek x' - y <- peek y' - return (x, y) + x <- peek x' :: IO Int32 + y <- peek y' :: IO Int32 + return (fromEnum x, fromEnum y) foreign import ccall "hb_font_get_scale" hb_font_get_scale - :: Font_ -> Ptr Int -> Ptr Int -> IO () + :: Font_ -> Ptr Int32 -> Ptr Int32 -> IO () -- | Fetches the "synthetic slant" of a font. fontSyntheticSlant :: Font -> Float -- 2.30.2