~jaro/balkon

ref: 1c79394163b5e6dcca224451d8b2d9a8c5234fa1 balkon/test/Data/Text/ParagraphLayout/SpanData.hs -rw-r--r-- 1.2 KiB
1c793941Jaro Set release date for v0.2.1.0. 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module Data.Text.ParagraphLayout.SpanData
    (emptySpan
    ,czechHello
    ,serbianMixedScript
    )
where

import Data.Text (pack)
import Data.Text.Glyphize (Font)
import Data.Text.ParagraphLayout (LineHeight(Normal))
import Data.Text.ParagraphLayout.Internal.ResolvedSpan (ResolvedSpan(..))

emptySpan :: Font -> ResolvedSpan
emptySpan font = ResolvedSpan
    { spanIndex = 0
    , spanOffsetInParagraph = 0
    , spanText = pack ""
    , spanFont = font
    , spanLineHeight = Normal
    , spanLanguage = "en"
    , spanLineBreaks = []
    , spanCharacterBreaks = []
    }

czechHello :: Font -> ResolvedSpan
czechHello font = ResolvedSpan
    { spanIndex = 0
    , spanOffsetInParagraph = 0
    , spanText = pack "Ahoj, světe!"
    , spanFont = font
    , spanLineHeight = Normal
    , spanLanguage = "cs"
    , spanLineBreaks = []
    , spanCharacterBreaks = []
    }

serbianMixedScript :: Font -> ResolvedSpan
serbianMixedScript font = ResolvedSpan
    { spanIndex = 0
    , spanOffsetInParagraph = 0
    , spanText = pack "Vikipedija (Википедија)"
    , spanFont = font
    , spanLineHeight = Normal
    , spanLanguage = "sr"
    , spanLineBreaks = []
    , spanCharacterBreaks = []
    }