pub struct ScaledWord {
pub glyph_infos: Vec<GlyphInfo>,
pub glyph_positions: Vec<GlyphPosition>,
pub word_width: f32,
}
Expand description
Word that is scaled (to a font / font instance), but not yet positioned
Fields§
§glyph_infos: Vec<GlyphInfo>
Glyphs, positions are relative to the first character of the word
glyph_positions: Vec<GlyphPosition>
Horizontal advances of each glyph, necessary for hit-testing characters later on (for text selection).
word_width: f32
The sum of the width of all the characters in this word
Implementations§
Source§impl ScaledWord
impl ScaledWord
Sourcepub fn cluster_iter<'a>(&'a self) -> ClusterIterator<'a> ⓘ
pub fn cluster_iter<'a>(&'a self) -> ClusterIterator<'a> ⓘ
Creates an iterator over clusters instead of glyphs
pub fn number_of_clusters(&self) -> usize
Trait Implementations§
Source§impl Clone for ScaledWord
impl Clone for ScaledWord
Source§fn clone(&self) -> ScaledWord
fn clone(&self) -> ScaledWord
Returns a copy of the value. Read more
1.0.0 · 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 ScaledWord
impl RefUnwindSafe for ScaledWord
impl Send for ScaledWord
impl Sync for ScaledWord
impl Unpin for ScaledWord
impl UnwindSafe for ScaledWord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)