A text render group. Contains all neccessary information to position a piece
of text.
A 4-tuple containing, respectively, the inclusive index where the piece of
text starts, the exclusive index where the piece of text ends (including
characters that aren't rendered, such as newlines), the right horizontal
offset of the piece of text and whether the piece of text overrides width or
not.
For characters that override width, the text range should have a length of 1
and will not be merged with other text render groups, else, it is a hint
containing the pre-measured size, for optimisation reasons, and may be merged
with other text render groups. Width-overidding groups where the text range
length is greater than 1 will have the length of each individual character as
an interpolation of the total length, where each character has equal width,
which is cheap, but innacurate; this is the reason why it is preferred to
have length 1 text range for width-overriding groups although you may still
want this for specific reasons (such as trailing space removal).
Width-overriding groups are also only meant to be used for whitespaces and
will therefore not be painted.
Note that 0-width text render groups are valid and used for empty lines.
A text render group. Contains all neccessary information to position a piece of text.
A 4-tuple containing, respectively, the inclusive index where the piece of text starts, the exclusive index where the piece of text ends (including characters that aren't rendered, such as newlines), the right horizontal offset of the piece of text and whether the piece of text overrides width or not.
For characters that override width, the text range should have a length of 1 and will not be merged with other text render groups, else, it is a hint containing the pre-measured size, for optimisation reasons, and may be merged with other text render groups. Width-overidding groups where the text range length is greater than 1 will have the length of each individual character as an interpolation of the total length, where each character has equal width, which is cheap, but innacurate; this is the reason why it is preferred to have length 1 text range for width-overriding groups although you may still want this for specific reasons (such as trailing space removal). Width-overriding groups are also only meant to be used for whitespaces and will therefore not be painted.
Note that 0-width text render groups are valid and used for empty lines.