Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unicode CMap defines mapping from glyphs to text
Synopsis
- data UnicodeCMap = UnicodeCMap {
- unicodeCMapCodeRanges :: [(ByteString, ByteString)]
- unicodeCMapChars :: Map Int Text
- unicodeCMapRanges :: [(Int, Int, Char)]
- parseUnicodeCMap :: ByteString -> Either String UnicodeCMap
- unicodeCMapNextGlyph :: UnicodeCMap -> ByteString -> Maybe (Int, ByteString)
- unicodeCMapDecodeGlyph :: UnicodeCMap -> Int -> Maybe Text
Documentation
data UnicodeCMap Source #
Unicode character map
Font dictionary can contain "ToUnicode" key -- reference to a stream with unicode CMap
UnicodeCMap | |
|
Instances
Show UnicodeCMap Source # | |
Defined in Pdf.Content.UnicodeCMap showsPrec :: Int -> UnicodeCMap -> ShowS # show :: UnicodeCMap -> String # showList :: [UnicodeCMap] -> ShowS # |
parseUnicodeCMap :: ByteString -> Either String UnicodeCMap Source #
Parse content of unicode CMap
unicodeCMapNextGlyph :: UnicodeCMap -> ByteString -> Maybe (Int, ByteString) Source #
Take the next glyph code from string, also returns the rest of the string
unicodeCMapDecodeGlyph :: UnicodeCMap -> Int -> Maybe Text Source #
Convert glyph to text
Note: one glyph can represent more then one char, e.g. for ligatures