mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -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:
@@ -795,11 +795,6 @@ impl Font<'_> {
|
|||||||
s.chars().all(|c| self.has_glyph(c))
|
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.
|
/// Segment text into runs where each run uses a single font face.
|
||||||
///
|
///
|
||||||
/// Grapheme clusters are never split across runs: if a combining mark
|
/// Grapheme clusters are never split across runs: if a combining mark
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ fn layout_section(
|
|||||||
|
|
||||||
// Set buffer flags for paragraph boundary context.
|
// Set buffer flags for paragraph boundary context.
|
||||||
let mut flags = harfrust::BufferFlags::empty();
|
let mut flags = harfrust::BufferFlags::empty();
|
||||||
if seg_idx == 0 && run_idx == 0 {
|
if run_idx == 0 {
|
||||||
flags |= harfrust::BufferFlags::BEGINNING_OF_TEXT;
|
flags |= harfrust::BufferFlags::BEGINNING_OF_TEXT;
|
||||||
}
|
}
|
||||||
if run_idx + 1 == num_runs {
|
if run_idx + 1 == num_runs {
|
||||||
|
|||||||
Reference in New Issue
Block a user