pub fn internal_load_font<'ttf, P: AsRef<Path>>(
    path: P,
    ptsize: u16,
) -> Result<Font<'ttf, 'static>, String> {
    unsafe {
        let cstring = CString::new(path.as_ref().to_str().unwrap()).unwrap();
        let raw = ttf::TTF_OpenFont(cstring.as_ptr(), ptsize as c_int);
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Font {
                raw: raw,
                rwops: None,
                _marker: PhantomData,
            })
        }
    }
}
/// Internally used to load a font (for internal visibility).
Internally used to load a font (for internal visibility).
Internally used to load a font ( for internal visibility ) .
pub fn internal_load_font<'ttf, P: AsRef<Path>>(
    path: P,
    ptsize: u16,
) -> Result<Font<'ttf, 'static>, String> {
    unsafe {
        let cstring = CString::new(path.as_ref().to_str().unwrap()).unwrap();
        let raw = ttf::TTF_OpenFont(cstring.as_ptr(), ptsize as c_int);
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Font {
                raw: raw,
                rwops: None,
                _marker: PhantomData,
            })
        }
    }
}
pub fn internal_load_font < ' ttf , P : AsRef < Path > > ( path : P , ptsize : u16 , ) -> Result < Font < ' ttf , ' static > , String > { unsafe { let cstring = CString :: new ( path . as_ref ( ) . to_str ( ) . unwrap ( ) ) . unwrap ( ) ; let raw = ttf :: TTF_OpenFont ( cstring . as_ptr ( ) , ptsize as c_int ) ; if raw . is_null ( ) { Err ( get_error ( ) ) } else { Ok ( Font { raw : raw , rwops : None , _marker : PhantomData , } ) } } }
Internally used to load a font (for internal visibility).
Internally used to load a font ( for internal visibility ) .
path
P
ptsize
u16
path
P
ptsize
u16