S or /

SourceClass LayoutSection

from egui import LayoutSection
class LayoutSection:

A contiguous range of LayoutJob.text that shares the same TextFormat.

The sections of a LayoutJob are ordered and together cover the whole text with no gaps and no overlaps. See LayoutJob.sections for the full invariant.

Text is shaped on a per-section basis: each section is an independent shaping run. This means kerning (and ligatures) are only correct within a single section, and not across the boundary between two adjacent sections. For this reason LayoutJob.append merges consecutive sections when possible.

Properties§

@property def byte_range(self, /) -> tuple[int, int]§
@byte_range.setter def byte_range(self, /, byte_range: tuple[int, int]) -> None§
@property def format(self, /) -> TextFormat§
@format.setter def format(self, /, format: TextFormat) -> None§
@property def leading_space(self, /) -> float§
@leading_space.setter def leading_space(self, /, leading_space: float) -> None§