1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Fix duplicated docstring and symmetrize BEGINNING_OF_TEXT flag

Remove copy-pasted docstring on segment_into_runs, and set
BEGINNING_OF_TEXT on the first run of every paragraph segment
(not just the first segment) to match END_OF_TEXT behavior.
This commit is contained in:
gcailly
2026-03-25 20:45:08 +01:00
parent 7020573def
commit fc9ac39a6b
2 changed files with 1 additions and 6 deletions

View File

@@ -795,11 +795,6 @@ impl Font<'_> {
s.chars().all(|c| self.has_glyph(c))
}
/// Segment text into runs where each run uses a single font face.
///
/// Grapheme clusters are never split across runs: if a combining mark
/// falls back to a different font than its base character, it stays
/// with the base character's font (the shaper will handle it).
/// Segment text into runs where each run uses a single font face.
///
/// Grapheme clusters are never split across runs: if a combining mark

View File

@@ -341,7 +341,7 @@ fn layout_section(
// Set buffer flags for paragraph boundary context.
let mut flags = harfrust::BufferFlags::empty();
if seg_idx == 0 && run_idx == 0 {
if run_idx == 0 {
flags |= harfrust::BufferFlags::BEGINNING_OF_TEXT;
}
if run_idx + 1 == num_runs {