Struct graphics_buffer::BufferGlyphs [−][src]
pub struct BufferGlyphs<'f> { /* fields omitted */ }
A character cache for drawing text to a RenderBuffer
.
Methods
impl<'f> BufferGlyphs<'f>
[src]
impl<'f> BufferGlyphs<'f>
pub fn from_bytes(bytes: &'f [u8]) -> Result<BufferGlyphs<'f>, Error>
[src]
pub fn from_bytes(bytes: &'f [u8]) -> Result<BufferGlyphs<'f>, Error>
Loads a BufferGlyphs
from an array of font data.
pub fn from_font(font: Font<'f>) -> BufferGlyphs<'f>
[src]
pub fn from_font(font: Font<'f>) -> BufferGlyphs<'f>
Loads a BufferGlyphs
from a Font
.
Trait Implementations
impl<'f> CharacterCache for BufferGlyphs<'f>
[src]
impl<'f> CharacterCache for BufferGlyphs<'f>
type Texture = RenderBuffer
The texture type associated with the character cache.
type Error = Error
The error type associated with the character cache.
fn character<'a>(
&'a mut self,
font_size: FontSize,
ch: char
) -> Result<Character<'a, Self::Texture>, Self::Error>
[src]
fn character<'a>(
&'a mut self,
font_size: FontSize,
ch: char
) -> Result<Character<'a, Self::Texture>, Self::Error>
Get reference to character.
fn width(&mut self, size: FontSize, text: &str) -> Result<Scalar, Self::Error>
[src]
fn width(&mut self, size: FontSize, text: &str) -> Result<Scalar, Self::Error>
Return the width for some given text.
Auto Trait Implementations
impl<'f> Send for BufferGlyphs<'f>
impl<'f> Send for BufferGlyphs<'f>
impl<'f> Sync for BufferGlyphs<'f>
impl<'f> Sync for BufferGlyphs<'f>