~jaro/balkon

ref: 5b76807e4e2a0b711b110d25719acdd3fea043a4 balkon/src/Data/Text/ParagraphLayout/Internal/LineHeight.hs -rw-r--r-- 820 bytes
5b76807eJaro Test vertical alignment vs line breaking interaction. 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)