pub fn from_path<P: AsRef<Path>>(path: P, read_flags: DataAccessFlags) -> Result<Self> {
        let mut this = Self::from_core(*Self::none());
        let path = CString::new(path.as_ref().to_string_lossy().into_owned().into_bytes()).unwrap();
        unsafe {
            errcode_to_result(ffi::blFontLoaderCreateFromFile(
                this.core_mut(),
                path.as_ptr(),
                read_flags.bits(),
            ))
            .map(|_| this)
        }
    }
/// Creates a new font by reading a file at the given path.
Creates a new font by reading a file at the given path.
Creates a new font by reading a file at the given path .
pub fn from_path<P: AsRef<Path>>(path: P, read_flags: DataAccessFlags) -> Result<Self> {
        let mut this = Self::from_core(*Self::none());
        let path = CString::new(path.as_ref().to_string_lossy().into_owned().into_bytes()).unwrap();
        unsafe {
            errcode_to_result(ffi::blFontLoaderCreateFromFile(
                this.core_mut(),
                path.as_ptr(),
                read_flags.bits(),
            ))
            .map(|_| this)
        }
    }
pub fn from_path < P : AsRef < Path > > ( path : P , read_flags : DataAccessFlags ) -> Result < Self > { let mut this = Self :: from_core ( * Self :: none ( ) ) ; let path = CString :: new ( path . as_ref ( ) . to_string_lossy ( ) . into_owned ( ) . into_bytes ( ) ) . unwrap ( ) ; unsafe { errcode_to_result ( ffi :: blFontLoaderCreateFromFile ( this . core_mut ( ) , path . as_ptr ( ) , read_flags . bits ( ) , ) ) . map ( | _ | this ) } }
Creates a new font by reading a file at the given path.
Creates a new font by reading a file at the given path .
path
P
read_flags
DataAccessFlags