pub struct TextCluster {
pub cluster_index: usize,
pub byte_range: Range<usize>,
pub utf16_range: Range<usize>,
pub glyph_range: Range<usize>,
pub x_start: f32,
pub x_end: f32,
pub font_id: FontId,
}Expand description
An atomic text cluster associating source code points with shaped glyphs.
Fields§
§cluster_index: usize0-based index of this cluster within the run.
byte_range: Range<usize>Byte range in the original UTF-8 logical source text.
utf16_range: Range<usize>UTF-16 code unit range in native representation.
glyph_range: Range<usize>Range of glyph indices in the run’s glyphs array belonging to this cluster.
x_start: f32Visual horizontal start coordinate (inclusive).
x_end: f32Visual horizontal end coordinate (inclusive).
font_id: FontIdProducing font identity for this cluster.
Implementations§
Trait Implementations§
Source§impl Clone for TextCluster
impl Clone for TextCluster
Source§impl Debug for TextCluster
impl Debug for TextCluster
Source§impl PartialEq for TextCluster
impl PartialEq for TextCluster
impl StructuralPartialEq for TextCluster
Auto Trait Implementations§
impl Freeze for TextCluster
impl RefUnwindSafe for TextCluster
impl Send for TextCluster
impl Sync for TextCluster
impl Unpin for TextCluster
impl UnsafeUnpin for TextCluster
impl UnwindSafe for TextCluster
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more