cuts method

  1. @override
List<int>? cuts(
  1. List<(int, int)> opp,
  2. double x(
    1. int
    ),
  3. double room,
  4. int lines, {
  5. double? firstRoom,
})
override

The breaks the paragraph is re-broken on, or null to leave it greedy: the indices into opp where its lines end, LAST FIRST and closed with 0 ([opp.length, ..., 0]). A line from break i to break j runs from the character after the space opp[i - 1] eats (or 0) to the one opp[j - 1] names, and x is the caret offset of a character on the run laid out as one line, so its width is x(end) - x(start). room is the line's width and lines the count the greedy break takes. firstRoom is the FIRST line's room where text-indent makes it another (css-text-3 8.1): each line is scored against its own room, so a hanging first line is balanced against the wider one (fixtures/indent-hanging-balance).

Implementation

@override
List<int>? cuts(List<(int, int)> opp, double Function(int) x, double room, int lines, {double? firstRoom}) =>
    prettyCuts(opp, x, room, lines, firstRoom: firstRoom);