[−][src]Struct rustybuzz::GlyphBuffer
A buffer that contains the results of the shaping process.
Implementations
impl GlyphBuffer
[src]
pub fn len(&self) -> usize
[src]
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.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the buffer contains no elements.
pub fn glyph_positions(&self) -> &[GlyphPosition]
[src]
Get the glyph positions.
pub fn glyph_infos(&self) -> &[GlyphInfo]
[src]
Get the glyph infos.
pub fn clear(self) -> UnicodeBuffer
[src]
Clears the content of the glyph buffer and returns an empty
UnicodeBuffer
reusing the existing allocation.
pub fn serializer<'a>(
&'a self,
font: Option<&'a Font<'a>>,
format: SerializeFormat,
flags: SerializeFlags
) -> BufferSerializer<'a>
[src]
&'a self,
font: Option<&'a Font<'a>>,
format: SerializeFormat,
flags: SerializeFlags
) -> BufferSerializer<'a>
Returns a serializer that allows the contents of the buffer to be converted into a human or machine readable representation.
Arguments
font
: Optionally a font can be provided for access to glyph names and glyph extents. IfNone
is passed an empty font is assumed.format
: The serialization format to use.flags
: Allows you to control which information will be contained in the serialized output.
Trait Implementations
impl Debug for GlyphBuffer
[src]
impl Display for GlyphBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for GlyphBuffer
impl !Send for GlyphBuffer
impl !Sync for GlyphBuffer
impl Unpin for GlyphBuffer
impl UnwindSafe for GlyphBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,