Skip to content

Commit 7fb06b3

Browse files
committed
Some more item => segment renames
1 parent 6c85b60 commit 7fb06b3

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

parley/src/shape/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ impl<'a, 'b, B: Brush> FontSelector<'a, 'b, B> {
260260
}
261261

262262
impl<'a, 'b, B: Brush> parley_engine::FontSelector for FontSelector<'a, 'b, B> {
263-
fn begin_item(&mut self, item: &parley_engine::itemize::Segment, options: &ShapeOptions<'_>) {
263+
fn begin_segment(
264+
&mut self,
265+
item: &parley_engine::itemize::Segment,
266+
options: &ShapeOptions<'_>,
267+
) {
264268
self.query.set_fallbacks(fontique::FallbackKey::new(
265269
item.script,
266270
options.language.as_ref(),

parley_engine/src/shape/shaper.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Shaper {
130130
)
131131
.expect("A segment must be yielded, given items tile the full text exactly");
132132

133-
shape_item(
133+
shape_segment(
134134
self,
135135
text,
136136
&segment,
@@ -159,7 +159,7 @@ impl Shaper {
159159
}
160160
}
161161

162-
fn shape_item(
162+
fn shape_segment(
163163
scx: &mut Shaper,
164164
text: &str,
165165
item: &Segment,
@@ -168,7 +168,7 @@ fn shape_item(
168168
char_info: &[CharInfo],
169169
shaped_text: &mut ShapedText,
170170
) {
171-
select_font.begin_item(item, options);
171+
select_font.begin_segment(item, options);
172172

173173
let text_range = &item.range.byte_range;
174174
let char_range = &item.range.char_range;
@@ -393,7 +393,7 @@ pub trait FontSelector {
393393
/// Called when a new item starts.
394394
///
395395
/// This can be useful to inspect, e.g., the item's script.
396-
fn begin_item(&mut self, item: &Segment, options: &ShapeOptions<'_>) {
396+
fn begin_segment(&mut self, item: &Segment, options: &ShapeOptions<'_>) {
397397
let _ = (item, options);
398398
}
399399

0 commit comments

Comments
 (0)