[][src]Struct imgui::ImFontAtlas

#[repr(C)]
pub struct ImFontAtlas<'a> { /* fields omitted */ }

A handle to imgui's font manager.

Methods

impl<'a> ImFontAtlas<'a>[src]

pub fn add_default_font(&mut self) -> ImFont[src]

Adds the default font to the font set.

pub fn add_default_font_with_config(&mut self, config: ImFontConfig) -> ImFont[src]

Adds the default fnt to the font set with the given configuration.

pub fn add_font(
    &mut self,
    data: &[u8],
    size: f32,
    range: &FontGlyphRange
) -> ImFont
[src]

Adds a custom font to the font set.

pub fn add_font_with_config(
    &mut self,
    data: &[u8],
    config: ImFontConfig,
    range: &FontGlyphRange
) -> ImFont
[src]

Adds a custom font to the font set with the given configuration. A font size must be set in the configuration.

Panics

If no font size is set for the configuration.

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

The number of fonts currently registered in the atlas.

pub fn index_font(&mut self, index: usize) -> ImFont[src]

Gets a font from the atlas.

Panics

Panics if the index is out of range.

pub fn clear(&mut self)[src]

Clears all fonts associated with this texture atlas.

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

pub fn set_texture_id(&mut self, value: usize)[src]

Auto Trait Implementations

impl<'a> !Send for ImFontAtlas<'a>

impl<'a> !Sync for ImFontAtlas<'a>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]