~jaro/balkon

cdb4745aefe866909f1e1dab2580bd789591243d — Jaro 1 year, 9 months ago 6503737
Use CSS-compatible line height settings.
2 files changed, 6 insertions(+), 5 deletions(-)

M src/Data/Text/ParagraphLayout/Plain.hs
M test/Data/Text/ParagraphLayout/PlainSpec.hs
M src/Data/Text/ParagraphLayout/Plain.hs => src/Data/Text/ParagraphLayout/Plain.hs +5 -4
@@ 72,11 72,12 @@ data ParagraphOptions = ParagraphOptions

data LineHeight

    = Absolute Int32
    -- ^ Set line height independently of the font.
    = Normal
    -- ^ Determine the preferred line height automatically using its ascent and
    -- descent metrics.

    | Relative Float
    -- ^ Set line height as a multiplier of the font's built-in value.
    | Absolute Int32
    -- ^ Set the preferred line height independently of the font.

-- | The resulting layout of the whole paragraph.
data ParagraphLayout = ParagraphLayout

M test/Data/Text/ParagraphLayout/PlainSpec.hs => test/Data/Text/ParagraphLayout/PlainSpec.hs +1 -1
@@ 71,7 71,7 @@ emptySpanLayout :: ParagraphLayout
emptySpanLayout = ParagraphLayout (Rect 0 0 0 0) [SpanLayout []]

opts :: Font -> ParagraphOptions
opts font = ParagraphOptions font (Relative 1.5) 20000
opts font = ParagraphOptions font Normal 20000

spec :: Spec
spec = do