~alcinnz/fontconfig-pure

f32f82d27b425b0f0347b599d9cc72913e56fbb1 — Adrian Cochrane 2 years ago bdaebbb
Document FcCharSet language bindings.
1 files changed, 2 insertions(+), 0 deletions(-)

M Graphics/Text/Font/Choose/CharSet.hs
M Graphics/Text/Font/Choose/CharSet.hs => Graphics/Text/Font/Choose/CharSet.hs +2 -0
@@ 13,6 13,7 @@ import GHC.Base (unsafeChr)
import Data.Char (ord, isHexDigit)
import Numeric (readHex)

-- | An FcCharSet is a set of Unicode chars.
type CharSet = Set Char

parseChar :: String -> Char


@@ 21,6 22,7 @@ replaceWild ch ('?':rest) = ch:replaceWild ch rest
replaceWild ch (c:cs) = c:replaceWild ch cs
replaceWild _ "" = ""
parseWild ch str = parseChar $ replaceWild ch str
-- | Utility for parsing "unicode-range" @font-face property.
parseCharSet ('U':rest) = parseCharSet ('u':rest) -- lowercase initial "u"
parseCharSet ('u':'+':cs)
    | (start@(_:_), '-':ends) <- span isHexDigit cs,