~alcinnz/fontconfig-pure

5df07b355e3e3f327084fa714cab7956c4c54202 — Adrian Cochrane 2 years ago d87a046
Document FcRange bindings, expose FontFaceParser, & document LangResult enum.
M Graphics/Text/Font/Choose.hs => Graphics/Text/Font/Choose.hs +1 -1
@@ 1,5 1,5 @@
module Graphics.Text.Font.Choose(CharSet, FontSet, ObjectSet, Pattern(..), Binding(..),
  Range(..), iRange, StrSet, StrList, Value(..),
  Range(..), iRange, StrSet, StrList, Value(..), FontFaceParser(..),

  Config, configCreate,
  configSetCurrent, configGetCurrent, configUptoDate, configHome, configEnableHome,

M Graphics/Text/Font/Choose/LangSet.hs => Graphics/Text/Font/Choose/LangSet.hs +1 -0
@@ 34,6 34,7 @@ langs :: LangSet
langs = unsafePerformIO $ thawStrSet_ $ fcGetLangs
foreign import ccall "FcGetLangs" fcGetLangs :: IO StrSet_

-- | Result of language comparisons.
data LangResult = SameLang | DifferentTerritory | DifferentLang
    deriving (Enum, Eq, Read, Show)
-- | `langSetCompare` compares language coverage for ls_a and ls_b.

M Graphics/Text/Font/Choose/Range.hs => Graphics/Text/Font/Choose/Range.hs +2 -0
@@ 10,7 10,9 @@ import GHC.Generics (Generic)
import Data.Hashable (Hashable)
import Graphics.Text.Font.Choose.Result (throwNull, throwFalse)

-- | Matches a numeric range.
data Range = Range Double Double deriving (Eq, Show, Ord, Generic)
-- | Matches an integral range.
iRange i j = toEnum i `Range` toEnum j

instance Hashable Range