~alcinnz/fontconfig-pure

c75f865cd15de2443e55ca2189add717c01d4cef — Adrian Cochrane 2 years ago cc3a295
Correct FcType (and in turn FcValue) decoding.
1 files changed, 7 insertions(+), 6 deletions(-)

M Graphics/Text/Font/Choose/Value.hs
M Graphics/Text/Font/Choose/Value.hs => Graphics/Text/Font/Choose/Value.hs +7 -6
@@ 106,21 106,22 @@ thawValue ptr = do
        3 -> do
            val <- throwNull <$> peek val'
            Just <$> ValueString <$> peekCString val
        4 -> do
        4 -> Just <$> ValueBool <$> peek val'
        5 -> do
            mat' <- throwNull <$> peek val'
            xx <- peekElemOff mat' 0
            xy <- peekElemOff mat' 1
            yx <- peekElemOff mat' 2
            yy <- peekElemOff mat' 3
            return $ Just $ ValueMatrix $ V2 (V2 xx yx) (V2 xy yy)
        5 -> do
            return $ Just $ ValueMatrix $ V2 (V2 xx xy) (V2 yx yy)
        6 -> do
            val <- throwNull <$> peek val'
            Just <$> ValueCharSet <$> thawCharSet val
        6 -> Just <$> ValueFTFace <$> throwNull <$> peek val'
        7 -> do
        7 -> Just <$> ValueFTFace <$> throwNull <$> peek val'
        8 -> do
            val <- throwNull <$> peek val'
            Just <$> ValueLangSet <$> thawLangSet val
        8 -> do
        9 -> do
            val <- throwNull <$> peek val'
            Just <$> ValueRange <$> thawRange val
        _ -> return Nothing