~jaro/balkon

ref: 7efca56bb946ebef06711512cbc49eb2c1216c1c balkon/src/Data/Text/ParagraphLayout/Internal/ParagraphOptions.hs -rw-r--r-- 1017 bytes
7efca56bJaro Separate internal plain Paragraph/ParagraphLayout. 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
module Data.Text.ParagraphLayout.Internal.ParagraphOptions
    ( ParagraphOptions (..)
    )
where

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

import Data.Text.ParagraphLayout.Internal.LineHeight

-- | Defines options relevant to the entire paragraph.
data ParagraphOptions = ParagraphOptions

    { paragraphFont :: Font
    -- ^ Font to be used for shaping and measurement.
    -- Make sure to set its scale (see `Data.Text.Glyphize.optionScale`) using
    -- the same units that you want in the output.

    , paragraphLineHeight :: LineHeight
    -- ^ Preferred line height of the resulting box fragments.

    , paragraphMaxWidth :: Int32
    -- ^ Line width at which line breaking should occur.
    -- Lines will be broken at language-appropriate boundaries.
    -- If a line still exceeds this limit then, it will be broken at character
    -- boundaries, and if it already consists of a single cluster that cannot
    -- be further broken down, it will overflow.

    }
    deriving (Eq, Show)