Struct rustybuzz::GlyphBuffer
source · pub struct GlyphBuffer(_);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) -> &[GlyphInfo]
pub fn glyph_infos(&self) -> &[GlyphInfo]
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: &Face<'_>, flags: SerializeFlags) -> String
pub fn serialize(&self, face: &Face<'_>, flags: SerializeFlags) -> String
Converts the glyph buffer content into a string.