~jaro/balkon

ref: c5e25e2b7a77d3af82227c1151820c2f4ddc559f balkon/src/Data/Text/ParagraphLayout/Internal/Layout.hs -rw-r--r-- 20.3 KiB
Clean up vertical alignment code structure.
Do not pass around text direction unnecessarily.
Add paragraphLines to Rich ParagraphLayout.

BREAKING: The paragraphLines field of ParagraphLayout must be preserved
for pagination.

BREAKING: The width of a rich text ParagraphLayout will now remain
unchanged after pagination.

BREAKING: Empty space at the top of the first line and at the bottom
of the last line in a ParagraphLayout will now be preserved.
Allow overriding font ascender and descender.

Provides an easy option for influencing vertical metrics, which may be
useful for implementing replaced and inline-block elements.
Implement vertical alignment.

BREAKING: Boxes now generate struts (CSS), which can make a line taller
than is necessary to contain its fragments.
Do not pass around unnecessary data.
Separate vertical alignment from horizontal positioning.
Store vertical offsets inside ProtoFragment.

Intended to make these offsets manipulable during layout.
Add internal structure for vertical offsets.
Add content rect to Fragment.
Allow trimmed whitespace to generate empty fragments.

BREAKING: Output may now contain more fragments with zero glyphs,
representing runs of whitespace that was trimmed away. These runs may
also start a box at the end of a line, instead of the beginning of the
next line.

BREAKING: Trimmed whitespace now affects line height.
Add extensible filter for invisible lines.
Add start/end paragraph alignment.

In the future, when the paragraph direction is not explicitly set,
start/end options will allow alignment to change line by line,
whereas left/right alignment will be constant.
Add centre/right paragraph alignment.
Internally mark hard line breaks.
Internally allow splitting texts at endpoints.

This is required in order to preserve a hard line break at the end of
the input.
Separate split list functions into a module.
Make RTL text overflow the left paragraph edge.

This behaviour is consistent with CSS Text Module Level 3.

BREAKING: Previously, all text would overflow the right paragraph edge,
regardless of text direction.
Fix handling of mixed line height.

Displace lines by the height of the tallest fragment in the previous
line, not the shortest one.
Remove TODO which would require an API break.
Next