From 817606194d4715b422c43d82fd37925b3794809e Mon Sep 17 00:00:00 2001 From: Jaro Date: Fri, 14 Apr 2023 07:36:15 +0200 Subject: [PATCH] Improve terminology around fragments. --- src/Data/Text/ParagraphLayout/Internal/Fragment.hs | 10 ++++++---- .../Text/ParagraphLayout/Internal/ParagraphOptions.hs | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Data/Text/ParagraphLayout/Internal/Fragment.hs b/src/Data/Text/ParagraphLayout/Internal/Fragment.hs index 0d7956d..b403b2a 100644 --- a/src/Data/Text/ParagraphLayout/Internal/Fragment.hs +++ b/src/Data/Text/ParagraphLayout/Internal/Fragment.hs @@ -11,10 +11,12 @@ import Data.Text.ParagraphLayout.Internal.Rect -- | A unit of text laid out in a rectangular area. -- --- Equivalent to the CSS3 terms /box fragment/ or /fragment/, except that --- continuous text even within one line can be split into multiple fragments, --- either because it comes from multiple input spans, or because it contains --- glyphs from multiple scripts. +-- Roughly equivalent to the term /text fragment/ as used in +-- [CSS Display Module Level 3](https://www.w3.org/TR/css-display-3/). +-- +-- An input span (or /text sequence/ in CSS terms) can be broken into multiple +-- fragments because of line breaking, because of bidirectional ordering, +-- or because it contains glyphs from multiple scripts. data Fragment = Fragment { fragmentRect :: Rect Int32 diff --git a/src/Data/Text/ParagraphLayout/Internal/ParagraphOptions.hs b/src/Data/Text/ParagraphLayout/Internal/ParagraphOptions.hs index 9dabf18..64a313d 100644 --- a/src/Data/Text/ParagraphLayout/Internal/ParagraphOptions.hs +++ b/src/Data/Text/ParagraphLayout/Internal/ParagraphOptions.hs @@ -17,7 +17,7 @@ data ParagraphOptions = ParagraphOptions -- the same units that you want in the output. , paragraphLineHeight :: LineHeight - -- ^ Preferred line height of the resulting box fragments. + -- ^ Preferred line height of the resulting fragments. , paragraphMaxWidth :: Int32 -- ^ Line width at which line breaking should occur. -- 2.30.2