~jaro/balkon

ref: 409c6d7eddc9c7f96438f7c9c2d51b1c644f1413 balkon/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs -rw-r--r-- 820 bytes
409c6d7eJaro Add paragraphLines to Rich ParagraphLayout. 1 year, 4 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.Internal.LineHeight (LineHeight (..))
where

import Data.Int (Int32)

-- | Determines the preferred line height of text in the resulting layout.
data LineHeight

    = Normal
    -- ^ The amount of vertical space taken up by the text in the layout
    -- will be exactly the distance between its font's ascender and descender
    -- line, with no further adjustment.

    | Absolute Int32
    -- ^ The amount of vertical space taken up by the text in the layout
    -- will be exactly the provided value. If this value is different from
    -- the distance between the font's ascender and descender line, the
    -- difference will be split in two equal parts (within a rounding error)
    -- and applied as /half-leading/ both above and below the glyphs.

    deriving (Eq, Read, Show)