~jaro/balkon

ref: 9cd91fba670a2470466a3dd80eb93292ecebdd8c balkon/src/Data/Text/ParagraphLayout/ResolvedSpan.hs -rw-r--r-- 551 bytes
9cd91fbaJaro Lay out Runs independently of Spans. 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.ResolvedSpan (ResolvedSpan(..))
where

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

import Data.Text.ParagraphLayout.LineHeight

-- | Internal structure containing resolved values that may be shared with
-- other spans across the paragraph.
data ResolvedSpan = ResolvedSpan
    { spanIndex :: Int
    , spanText :: Text
    , spanFont :: Font
    , spanLineHeight :: LineHeight
    , spanLanguage :: String
    }
    deriving (Show)

instance Eq ResolvedSpan where
    a == b = spanIndex a == spanIndex b