[−][src]Struct blend2d::glyph_buffer::GlyphBuffer
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
impl !Send for GlyphBuffer
impl Unpin for GlyphBuffer
impl !Sync for GlyphBuffer
impl RefUnwindSafe for GlyphBuffer
impl UnwindSafe for GlyphBuffer
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,