~jaro/balkon

ref: 6cf2c7c1029689145011c1836ec519a485b7f088 balkon/src/Data/Text/ParagraphLayout/Span.hs -rw-r--r-- 474 bytes
6cf2c7c1Jaro Use Rect in "plain" interface. 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Data.Text.ParagraphLayout.Span (Span(..))
where

import Data.Text.Glyphize (Font)
import Data.Text.Lazy (Text)

type Language = String

-- 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
    { spanText :: Text
    , spanFont :: Font
    , spanLanguage :: Maybe Language
    }
    deriving (Eq, Show)