[][src]Struct rustybuzz::GlyphBuffer

pub struct 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]

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. If None 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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.