pub fn new(path: &Path) -> Option<Rc<Font>> {
        let mut memory = Vec::new();
        let mut file = File::open(path).unwrap();
        let _ = file.read_to_end(&mut memory).unwrap();
        Font::from_bytes(&memory)
    }
/// Loads a new ttf font from a file.
Loads a new ttf font from a file.
Loads a new ttf font from a file .
pub fn new(path: &Path) -> Option<Rc<Font>> {
        let mut memory = Vec::new();
        let mut file = File::open(path).unwrap();
        let _ = file.read_to_end(&mut memory).unwrap();
        Font::from_bytes(&memory)
    }
pub fn new ( path : & Path ) -> Option < Rc < Font > > { let mut memory = Vec :: new ( ) ; let mut file = File :: open ( path ) . unwrap ( ) ; let _ = file . read_to_end ( & mut memory ) . unwrap ( ) ; Font :: from_bytes ( & memory ) }
Loads a new ttf font from a file.
Loads a new ttf font from a file .
path
&Path
path
&Path