~jaro/balkon

ref: 58f69b24f9a2138833dd86fbc8a1590760fecf64 balkon/test/Data/Text/ParagraphLayout/TextData.hs -rw-r--r-- 953 bytes
58f69b24Jaro Add helper function for run-length encoding. 1 year, 5 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
48
49
50
51
module Data.Text.ParagraphLayout.TextData
    ( englishEmpty
    , czechHello
    , arabicHello
    , serbianMixedScript
    , englishAroundArabic
    )
where

import Data.Text (Text, empty, pack)
import Data.Text.Glyphize (Direction (DirLTR, DirRTL))

type Language = String
type Sample = (Direction, Language, Text)

englishEmpty :: Sample
englishEmpty =
    ( DirLTR
    , "en"
    , empty
    )

czechHello :: Sample
czechHello =
    ( DirLTR
    , "cs"
    , pack "Ahoj, světe!"
    )

arabicHello :: Sample
arabicHello =
    ( DirRTL
    , "ar"
    , pack "سلام"
    )

serbianMixedScript :: Sample
serbianMixedScript =
    ( DirLTR
    , "sr"
    , pack "Vikipedija (Википедија)"
    )

-- | Source:
-- <https://www.w3.org/International/articles/inline-bidi-markup/uba-basics>
englishAroundArabic :: Sample
englishAroundArabic =
    ( DirLTR
    , "en"
    , pack "The title is مفتاح معايير الويب in Arabic."
    )