[][src]Struct blend2d::glyph_buffer::GlyphBuffer

pub struct GlyphBuffer { /* fields omitted */ }

Glyph buffer.

Can hold either text or glyphs and provides basic memory management that is used for text shaping, character to glyph mapping, glyph substitution, and glyph positioning.

Glyph buffer provides two separate buffers called 'primary' and 'secondary' that serve different purposes during processing. Primary buffer always hold a GlyphItem array, and secondary buffer is either used as a scratch buffer during glyph substitution or hold glyph positions after the processing is complete and glyph positions were calculated.

Methods

impl GlyphBuffer[src]

pub fn new() -> Self[src]

Creates a new empty GlyphBuffer.

pub fn from_utf8_text(text: &str) -> Self[src]

Creates a new GlyphBuffer initialized with the given text.

pub fn glyph_run(&self) -> GlyphRun[src]

pub fn glyph_item_data(&self) -> GlyphRun[src]

pub fn size(&self) -> usize[src]

pub fn flags(&self) -> GlyphRunFlags[src]

Returns the GlyphBuffer's GlyphRunFlags.

pub fn has_text(&self) -> bool[src]

Returns true if this GlyphBuffer contains unicode data.

pub fn has_glyphs(&self) -> bool[src]

Returns true if this GlyphBuffer contains GlyphId data.

pub fn has_invalid_chars(&self) -> bool[src]

Returns true if this GlyphBuffer contains invalid characters(unicode encoding errors).

pub fn has_undefined_chars(&self) -> bool[src]

Returns true if this GlyphBuffer contains undefined characters that weren't mapped properly to glyphs.

pub fn has_invalid_font_data(&self) -> bool[src]

Returns true if one or more operations were terminated before completion because of invalid data in a font.

pub fn clear(&mut self)[src]

Clears the content of this GlyphBuffer without releasing internal buffers.

pub fn set_utf8_text(&mut self, text: &str)[src]

Sets text content of this GlyphBuffer.

Trait Implementations

impl<'_> From<&'_ str> for GlyphBuffer[src]

impl Drop for GlyphBuffer[src]

impl Debug for GlyphBuffer[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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