{-# LINE 1 "FreeType/Format/CID.hsc" #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module FreeType.Format.CID
(
ft_Get_CID_Registry_Ordering_Supplement
, ft_Get_CID_Is_Internally_CID_Keyed
, ft_Get_CID_From_Glyph_Index
) where
import FreeType.Core.Base
import FreeType.Core.Types.Types
import FreeType.Exception.Internal
import FreeType.Format.CID.Internal
import Foreign.C.String
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
ft_Get_CID_Registry_Ordering_Supplement
:: FT_Face
-> IO (String, String, FT_Int)
ft_Get_CID_Registry_Ordering_Supplement face =
alloca $ \registryPtr ->
alloca $ \orderingPtr ->
alloca $ \supplementPtr -> do
ftError "ft_Get_CID_Registry_Ordering_Supplement" $
ft_Get_CID_Registry_Ordering_Supplement' face registryPtr orderingPtr supplementPtr
(,,)
<$> (peekCString . castPtr =<< peek registryPtr)
<*> (peekCString . castPtr =<< peek orderingPtr)
<*> peek supplementPtr
ft_Get_CID_Is_Internally_CID_Keyed
:: FT_Face
-> IO Bool
ft_Get_CID_Is_Internally_CID_Keyed face =
alloca $ \isCidPtr -> do
ftError "ft_Get_CID_Is_Internally_CID_Keyed"
$ ft_Get_CID_Is_Internally_CID_Keyed' face isCidPtr
isCid <- peek isCidPtr
return $ if isCid == 1
then True
else False
ft_Get_CID_From_Glyph_Index
:: FT_Face
-> FT_UInt
-> IO FT_UInt
ft_Get_CID_From_Glyph_Index =
autoAllocaError "ft_Get_CID_From_Glyph_Index" ft_Get_CID_From_Glyph_Index'