imsd-messages/interfaces
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf 335b27b72d
Wrap: word wrap and ellipsis over a measure function
Crafter.Graphics shapes one line at a time and drops newlines, so the app
breaks text itself: a greedy wrap with breaks after spaces and hyphens
(a space that itself overflows ends the line after the words that fit,
and opens no line of its own when it ends the text or a newline
follows; one at a line's start is no break at all, nor is a run of
them: a break is recorded only once the line holds a word, and a run of
spaces wider than the line splits like a word, with the same rule at the
text's end and before a newline), hard breaks at
newlines, over-long words split between code points, and
the run of spaces where a line wraps left out of both lines. Results are
cached per (text, width, size). The measure is a function, so the caller
supplies the advances; the tests use a constant ten-pixel advance.

Tested: tests/Wrap on a ten-pixel monospace measure, a leading run of
spaces among the cases.
2026-11-17 06:14:18 +01:00
..
ImsdMessages-Model.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages-Number.cppm Number: the conversation key of an address 2026-11-17 06:14:18 +01:00
ImsdMessages-Store.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages-Sync.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages-Time.cppm Time: ISO 8601 stamps, civil dates and the captions 2026-11-17 06:14:18 +01:00
ImsdMessages-Wrap.cppm Wrap: word wrap and ellipsis over a measure function 2026-11-17 06:14:18 +01:00
ImsdMessages.Bus-Client.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages.Bus-Instance.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages.Bus-Notifier.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages.Bus-Variant.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages.Bus.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00
ImsdMessages.cppm project: the repository skeleton 2026-10-17 23:14:00 +02:00