packages feed

balkon-1.3.0.0: src/Data/Text/ParagraphLayout/Internal/LineHeight.hs

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)