~jaro/balkon

ref: 0f5dfa9a2b6865dc46ef926983c64b2ab11fa3d1 balkon/src/Data/Text/ParagraphLayout/Span.hs -rw-r--r-- 534 bytes
0f5dfa9aJaro Use infix operators for constructing test data. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Data.Text.ParagraphLayout.Span (Span(..))
where

import Data.Text.Foreign (I8)

-- Paragraph is broken into spans by the caller.
--
-- Each span could have a different font family, size, style, text decoration,
-- colour, language, etc.
--
-- TODO: Add all relevant attributes.
--
data Span = Span

    { spanLength :: I8
    -- ^ Byte offset to the next span or the end of the paragraph text.

    , spanLanguage :: String
    -- ^ Used for selecting the appropriate glyphs and line breaking rules.

    }
    deriving (Show)