pub fn internal_load_font_at_index<'ttf, P: AsRef<Path>>(
    path: P,
    index: u32,
    ptsize: u16,
) -> Result<Font<'ttf, 'static>, String> {
    unsafe {
        let cstring = CString::new(path.as_ref().to_str().unwrap().as_bytes()).unwrap();
        let raw = ttf::TTF_OpenFontIndex(cstring.as_ptr(), ptsize as c_int, index as c_long);
        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_at_index<'ttf, P: AsRef<Path>>(
    path: P,
    index: u32,
    ptsize: u16,
) -> Result<Font<'ttf, 'static>, String> {
    unsafe {
        let cstring = CString::new(path.as_ref().to_str().unwrap().as_bytes()).unwrap();
        let raw = ttf::TTF_OpenFontIndex(cstring.as_ptr(), ptsize as c_int, index as c_long);
        if raw.is_null() {
            Err(get_error())
        } else {
            Ok(Font {
                raw: raw,
                rwops: None,
                _marker: PhantomData,
            })
        }
    }
}
pub fn internal_load_font_at_index < ' ttf , P : AsRef < Path > > ( path : P , index : u32 , ptsize : u16 , ) -> Result < Font < ' ttf , ' static > , String > { unsafe { let cstring = CString :: new ( path . as_ref ( ) . to_str ( ) . unwrap ( ) . as_bytes ( ) ) . unwrap ( ) ; let raw = ttf :: TTF_OpenFontIndex ( cstring . as_ptr ( ) , ptsize as c_int , index as c_long ) ; 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
index
u32
ptsize
u16
path
P
index
u32
ptsize
u16