#[repr(C)]pub struct ShapedWord {
pub glyph_infos: GlyphInfoVec,
pub word_width: usize,
}
Expand description
Word that is scaled (to a font / font instance), but not yet positioned
Fields§
§glyph_infos: GlyphInfoVec
Glyph codepoint, glyph ID + kerning data
word_width: usize
The sum of the width of all the characters in this word
Implementations§
Source§impl ShapedWord
impl ShapedWord
pub fn get_word_width(&self, units_per_em: u16, target_font_size: f32) -> f32
Sourcepub fn number_of_glyphs(&self) -> usize
pub fn number_of_glyphs(&self) -> usize
Returns the number of glyphs THAT ARE NOT DIACRITIC MARKS
Trait Implementations§
Source§impl Clone for ShapedWord
impl Clone for ShapedWord
Source§fn clone(&self) -> ShapedWord
fn clone(&self) -> ShapedWord
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 moreSource§impl Debug for ShapedWord
impl Debug for ShapedWord
Source§impl PartialEq for ShapedWord
impl PartialEq for ShapedWord
Source§impl PartialOrd for ShapedWord
impl PartialOrd for ShapedWord
impl StructuralPartialEq for ShapedWord
Auto Trait Implementations§
impl Freeze for ShapedWord
impl RefUnwindSafe for ShapedWord
impl Send for ShapedWord
impl Sync for ShapedWord
impl Unpin for ShapedWord
impl UnwindSafe for ShapedWord
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more