pub struct GlyphBuffer(/* private fields */);
Expand description
A buffer that contains the results of the shaping process.
Implementations§
source§impl GlyphBuffer
impl GlyphBuffer
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of the data of the buffer.
When called before shaping this is the number of unicode codepoints contained in the buffer. When called after shaping it returns the number of glyphs stored.
sourcepub fn glyph_infos(&self) -> &[hb_glyph_info_t]
pub fn glyph_infos(&self) -> &[hb_glyph_info_t]
Get the glyph infos.
sourcepub fn glyph_positions(&self) -> &[GlyphPosition]
pub fn glyph_positions(&self) -> &[GlyphPosition]
Get the glyph positions.
sourcepub fn clear(self) -> UnicodeBuffer
pub fn clear(self) -> UnicodeBuffer
Clears the content of the glyph buffer and returns an empty
UnicodeBuffer
reusing the existing allocation.
sourcepub fn serialize(&self, face: &hb_font_t<'_>, flags: SerializeFlags) -> String
pub fn serialize(&self, face: &hb_font_t<'_>, flags: SerializeFlags) -> String
Converts the glyph buffer content into a string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlyphBuffer
impl RefUnwindSafe for GlyphBuffer
impl Send for GlyphBuffer
impl Sync for GlyphBuffer
impl Unpin for GlyphBuffer
impl UnwindSafe for GlyphBuffer
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