pub struct GlyphCluster {
pub glyphs: Vec<ShapedGlyph>,
pub source_start: u32,
pub source_end: u32,
}Expand description
A group of ShapedGlyphs that together form a single user-perceived
grapheme cluster (e.g. a base letter plus combining marks, or an emoji
ZWJ sequence rendered as one glyph).
Clusters are the atomic unit for cursor movement, selection, and line-breaking: a layout engine must never split text inside a cluster.
Fields§
§glyphs: Vec<ShapedGlyph>The glyphs that make up this cluster, in logical order.
source_start: u32UTF-8 byte offset of the cluster start in the source string.
source_end: u32UTF-8 byte offset of the cluster end (exclusive) in the source string.
Implementations§
Trait Implementations§
Source§impl Clone for GlyphCluster
impl Clone for GlyphCluster
Source§fn clone(&self) -> GlyphCluster
fn clone(&self) -> GlyphCluster
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GlyphCluster
impl RefUnwindSafe for GlyphCluster
impl Send for GlyphCluster
impl Sync for GlyphCluster
impl Unpin for GlyphCluster
impl UnsafeUnpin for GlyphCluster
impl UnwindSafe for GlyphCluster
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