Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The GlyphInfoT
is the structure that holds information about the
glyphs and their relation to input text.
Synopsis
- newtype GlyphInfoT = GlyphInfoT (ManagedPtr GlyphInfoT)
- newZeroGlyphInfoT :: MonadIO m => m GlyphInfoT
- getGlyphInfoTCluster :: MonadIO m => GlyphInfoT -> m Word32
- setGlyphInfoTCluster :: MonadIO m => GlyphInfoT -> Word32 -> m ()
- getGlyphInfoTCodepoint :: MonadIO m => GlyphInfoT -> m Word32
- setGlyphInfoTCodepoint :: MonadIO m => GlyphInfoT -> Word32 -> m ()
Exported types
newtype GlyphInfoT Source #
Memory-managed wrapper type.
Instances
newZeroGlyphInfoT :: MonadIO m => m GlyphInfoT Source #
Construct a GlyphInfoT
struct initialized to zero.
Methods
Properties
cluster
the index of the character in the original text that corresponds
to this GlyphInfoT
, or whatever the client passes to
bufferAdd
. More than one GlyphInfoT
can have the same
cluster
value, if they resulted from the same character (e.g. one
to many glyph substitution), and when more than one character gets
merged in the same glyph (e.g. many to one glyph substitution) the
GlyphInfoT
will have the smallest cluster value of them.
By default some characters are merged into the same cluster
(e.g. combining marks have the same cluster as their bases)
even if they are separate glyphs, bufferSetClusterLevel
allow selecting more fine-grained cluster handling.
getGlyphInfoTCluster :: MonadIO m => GlyphInfoT -> m Word32 Source #
Get the value of the “cluster
” field.
When overloading is enabled, this is equivalent to
get
glyphInfoT #cluster
setGlyphInfoTCluster :: MonadIO m => GlyphInfoT -> Word32 -> m () Source #
Set the value of the “cluster
” field.
When overloading is enabled, this is equivalent to
set
glyphInfoT [ #cluster:=
value ]
codepoint
either a Unicode code point (before shaping) or a glyph index (after shaping).
getGlyphInfoTCodepoint :: MonadIO m => GlyphInfoT -> m Word32 Source #
Get the value of the “codepoint
” field.
When overloading is enabled, this is equivalent to
get
glyphInfoT #codepoint
setGlyphInfoTCodepoint :: MonadIO m => GlyphInfoT -> Word32 -> m () Source #
Set the value of the “codepoint
” field.
When overloading is enabled, this is equivalent to
set
glyphInfoT [ #codepoint:=
value ]