M CHANGELOG.md => CHANGELOG.md +3 -0
@@ 2,6 2,9 @@
## 1.2.0.0 -- TBD
+* Fixed a bug where only the height of the shortest fragment on a line
+ would be considered when positioning the following line.
+
* Removed `paragraphLineHeight` from the rich text interface
after it was included by mistake.
Rich text needs to use `textLineHeight` instead.
M src/Data/Text/ParagraphLayout/Internal/Layout.hs => src/Data/Text/ParagraphLayout/Internal/Layout.hs +1 -1
@@ 103,7 103,7 @@ positionLineH :: Int32 -> (Int, PL.ProtoLine NonEmpty d) ->
(Int32, NonEmpty (FragmentWithSpan d))
positionLineH originY (num, pl) = (nextY, frags)
where
- nextY = maximum $ fmap y_min rects
+ nextY = minimum $ fmap y_min rects
rects = fmap (\ (WithSpan _ r) -> fragmentRect r) frags
(_, frags) = mapAccumL (positionFragmentH num originY) originX wpfs
wpfs = PL.applyBoxes pl