~alcinnz/fontconfig-pure

ref: dbefdc068d0644a778f12cc661e87a4086429505 fontconfig-pure/lib/Graphics/Text/Font/Choose/Weight.hs -rw-r--r-- 671 bytes
dbefdc06 — Adrian Cochrane Document modules. 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
{-# LANGUAGE CApiFFI #-}
-- | Convert between OpenType & FontConfig weight scales.
module Graphics.Text.Font.Choose.Weight(weightFromOpenTypeDouble,
        weightToOpenTypeDouble, weightFromOpenType, weightToOpenType) where

foreign import capi "fontconfig/fontconfig.h FcWeightFromOpenTypeDouble"
    weightFromOpenTypeDouble :: Double -> Double
foreign import capi "fontconfig/fontconfig.h FcWeightToOpenTypeDouble"
    weightToOpenTypeDouble :: Double -> Double
foreign import capi "fontconfig/fontconfig.h FcWeightFromOpenType"
    weightFromOpenType :: Int -> Int
foreign import capi "fontconfig/fontconfig.h FcWeightToOpenType" 
    weightToOpenType :: Int -> Int