~jaro/balkon

2d06bc9a995587a140a440f89cb37923fcb7f46a — Jaro 1 year, 7 months ago 4415c30
Test interaction between boxes and mixed script.
A .golden/richParagraphLayout/mixedScript.golden => .golden/richParagraphLayout/mixedScript.golden +127 -0
@@ 0,0 1,127 @@
ParagraphLayout
    { paragraphRect = Rect {x_origin = 0, y_origin = 0, x_size = 15283, y_size = -1121}
    , paragraphFragments =
        [ Fragment
            { fragmentUserData = "text1"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 0, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 6, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 7, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 8, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text1"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 777, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 9, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 11, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 13, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text2"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box1", boxLeftSpacing = Just 50, boxRightSpacing = Nothing, boxStartSpacing = Just 50, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 3162, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 15, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 16, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 17, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text2"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box1", boxLeftSpacing = Nothing, boxRightSpacing = Just 100, boxStartSpacing = Nothing, boxEndSpacing = Just 100}
                ]
            , fragmentRect = Rect {x_origin = 3939, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 18, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 20, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 22, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text3"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 6374, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 24, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 26, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 28, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Just 150, boxRightSpacing = Nothing, boxStartSpacing = Just 150, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 8859, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 30, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 32, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 34, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Nothing, boxRightSpacing = Nothing, boxStartSpacing = Nothing, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 11194, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 36, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 37, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 38, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Nothing, boxRightSpacing = Just 200, boxStartSpacing = Nothing, boxEndSpacing = Just 200}
                ]
            , fragmentRect = Rect {x_origin = 11971, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 39, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 41, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 43, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text5"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 14506, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 45, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 46, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 47, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        ]
    }

A .golden/richParagraphLayout/mixedScriptWrap.golden => .golden/richParagraphLayout/mixedScriptWrap.golden +149 -0
@@ 0,0 1,149 @@
ParagraphLayout
    { paragraphRect = Rect {x_origin = 0, y_origin = 0, x_size = 4897, y_size = -4484}
    , paragraphFragments =
        [ Fragment
            { fragmentUserData = "text1"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 0, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 6, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 7, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 8, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text1"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 777, y_origin = 0, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 9, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 11, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 13, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text2"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box1", boxLeftSpacing = Just 50, boxRightSpacing = Nothing, boxStartSpacing = Just 50, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 3162, y_origin = 0, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 15, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 16, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 17, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text2"
            , fragmentLine = 1
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box1", boxLeftSpacing = Nothing, boxRightSpacing = Nothing, boxStartSpacing = Nothing, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 3939, y_origin = 0, x_size = 763, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 18, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text2"
            , fragmentLine = 2
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box1", boxLeftSpacing = Nothing, boxRightSpacing = Just 100, boxStartSpacing = Nothing, boxEndSpacing = Just 100}
                ]
            , fragmentRect = Rect {x_origin = 0, y_origin = -1121, x_size = 1549, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 20, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 22, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text3"
            , fragmentLine = 2
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 1649, y_origin = -1121, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 24, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 26, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 28, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 2
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Just 150, boxRightSpacing = Nothing, boxStartSpacing = Just 150, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 4134, y_origin = -1121, x_size = 763, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 30, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 3
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Nothing, boxRightSpacing = Nothing, boxStartSpacing = Nothing, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 0, y_origin = -2242, x_size = 1549, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 32, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 34, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 3
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Nothing, boxRightSpacing = Nothing, boxStartSpacing = Nothing, boxEndSpacing = Nothing}
                ]
            , fragmentRect = Rect {x_origin = 1549, y_origin = -2242, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 36, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 37, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 38, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text4"
            , fragmentLine = 3
            , fragmentAncestorBoxes =
                [ AncestorBox {boxUserData = "box2", boxLeftSpacing = Nothing, boxRightSpacing = Just 200, boxStartSpacing = Nothing, boxEndSpacing = Just 200}
                ]
            , fragmentRect = Rect {x_origin = 2326, y_origin = -2242, x_size = 2335, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 758, cluster = 39, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 41, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 786, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 758, cluster = 43, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 763, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        , Fragment
            { fragmentUserData = "text5"
            , fragmentLine = 4
            , fragmentAncestorBoxes =
                []
            , fragmentRect = Rect {x_origin = 0, y_origin = -3363, x_size = 777, y_size = -1121}
            , fragmentPen = (0, -932)
            , fragmentGlyphs =
                [ (GlyphInfo {codepoint = 77, cluster = 45, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 46, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 262, y_advance = 0, x_offset = 0, y_offset = 0})
                , (GlyphInfo {codepoint = 77, cluster = 47, unsafeToBreak = False, unsafeToConcat = False, safeToInsertTatweel = False}, GlyphPos {x_advance = 253, y_advance = 0, x_offset = 0, y_offset = 0})
                ]
            }
        ]
    }

M test/Data/Text/ParagraphLayout/Rich/ParagraphData.hs => test/Data/Text/ParagraphLayout/Rich/ParagraphData.hs +26 -0
@@ 2,6 2,7 @@ module Data.Text.ParagraphLayout.Rich.ParagraphData
    ( hardBoxBreakLTRParagraph
    , hardBoxBreakRTLParagraph
    , loremIpsumParagraph
    , mixedScriptParagraph
    , mixedSizesParagraph
    , nestedBoxesParagraph
    , softBreakParagraph


@@ 87,6 88,31 @@ loremIpsumParagraph font = constructParagraph
    where
        t = tLTR { textFont = font, textLanguage = "zxx" }

mixedScriptParagraph :: Font -> ParagraphOptions -> Paragraph String
mixedScriptParagraph font = constructParagraph
    (pack "prefix")
    (rootBox t
        [ text "text1" "jjjжжж"
        -- Box starting on script boundary:
        , box "box1" b1 t
            -- Box continuing over script boundary:
            [ text "text2" "jjjжжж" ]
        -- Box ending outside script boundary:
        , text "text3" "жжж"
        -- Box starting outside script boundary:
        , box "box2" b2 t
            -- Box continuing over two script boundaries:
            [ text "text4" "жжжjjjжжж" ]
        -- Box ending on script boundary:
        , text "text5" "jjj"
        ]
    )
    (pack "suffix")
    where
        b1 = b_ { boxSpacing = BoxSpacingLeftRight 50 100 }
        b2 = b_ { boxSpacing = BoxSpacingLeftRight 150 200 }
        t = tLTR { textFont = font, textLanguage = "zxx" }

mixedSizesParagraph :: (Font, Font) -> ParagraphOptions -> Paragraph String
mixedSizesParagraph (bigFont, smallFont) = constructParagraph
    (pack "prefix")

M test/Data/Text/ParagraphLayout/RichSpec.hs => test/Data/Text/ParagraphLayout/RichSpec.hs +12 -0
@@ 41,6 41,18 @@ spec = do
                let result = layoutRich input
                result `shouldBeGolden` "mixedSizes"

            it "handles mixed script" $ do
                let opts = defaultParagraphOptions
                let input = mixedScriptParagraph font opts
                let result = layoutRich input
                result `shouldBeGolden` "mixedScript"

            it "handles mixed script with line wraps" $ do
                let opts = defaultParagraphOptions { paragraphMaxWidth = 5000 }
                let input = mixedScriptParagraph font opts
                let result = layoutRich input
                result `shouldBeGolden` "mixedScriptWrap"

            it "handles nested boxes" $ do
                let opts = defaultParagraphOptions
                let input = nestedBoxesParagraph font opts