pub fn add_font_mem(&mut self, name: &str, data: &[u8]) {
        // TODO - return error
        if self.resource_manager.fonts.contains_key(name) {
            println!("Font already exists");
            return;
        }

        self.resource_manager.fonts.insert(name.to_owned(), FontOrId::Font(data.to_vec()));
    }
/// Add a font from memory to the application.
Add a font from memory to the application.
Add a font from memory to the application .
pub fn add_font_mem(&mut self, name: &str, data: &[u8]) {
        // TODO - return error
        if self.resource_manager.fonts.contains_key(name) {
            println!("Font already exists");
            return;
        }
        self.resource_manager.fonts.insert(name.to_owned(), FontOrId::Font(data.to_vec()));
    }
pub fn add_font_mem ( & mut self , name : & str , data : & [ u8 ] ) { // TODO - return error if self . resource_manager . fonts . contains_key ( name ) { println ! ( " " ) ; return ; } self . resource_manager . fonts . insert ( name . to_owned ( ) , FontOrId :: Font ( data . to_vec ( ) ) ) ; }
Add a font from memory to the application.
Add a font from memory to the application .
&mut self
name
&str
data
&[u8]