linebender / linebender/skribo
Can shaping be reused for different line breaks?
- Dominant language
- Rust
- Stars
- 335
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Can a the result of shaping a Unicode string differ from concatenating the results of shaping the two parts, after splitting that string at a line break opportunity?
Or phrased differently: when making multiple layouts of an otherwise-identical paragraph by making different choices about which line break opportunities to take, can we reuse some of the results of shaping computation? This might come up for example when resizing a window or other container.
For CSS layout specifically, we sometimes need to compute the `min-content` and `max-content` [intrinsic size](https://drafts.csswg.org/css-sizing/#intrinsic-sizes) of an element. For text, this means measuring the width of the widest line when taking respectively all or none of the break opportunities.
Assuming that shaping is somewhat expensive, it would be good if we can avoid doing it from scratch three times. (Twice for `min-` and `max-content`, then once more for “real” layout.)
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files, tests, or entry points. Start by locating the Rust library's shaping and line-break handling, then investigate whether shaping results can be reused across break opportunities. Done would require a decided approach, documented behavior, and tests or measurements covering the proposed reuse.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100