~jaro/balkon

ref: 8438e1604767ae5210432d5e920069f767d60343 balkon/src/Data/Text/ParagraphLayout/Span.hs -rw-r--r-- 474 bytes
8438e160Jaro Add module for working with rectangle coordinates. 1 year, 7 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)