Struct freetype::library::Library
[−]
[src]
pub struct Library { // some fields omitted }
Methods
impl Library
fn init() -> FtResult<Self>
This function is used to create a new FreeType library instance and add the default modules. It returns a struct encapsulating the freetype library. The library is correctly discarded when the struct is dropped.
fn new_face<P>(&self, path: P, face_index: isize) -> FtResult<Face<'static>> where P: AsRef<OsStr>
Open a font file using its pathname. face_index
should be 0 if there is only 1 font
in the file.
fn new_memory_face<'a>(&self, buffer: &'a [u8], face_index: isize) -> FtResult<Face<'a>>
Similar to new_face
, but loads file data from a byte array in memory
fn raw(&self) -> FT_Library
Get the underlying library object
fn get_memory(&self) -> &FT_MemoryRec
Get the underlying memory management object
fn new_memory(&self, alloc: Option<FT_Alloc_Func>, free: Option<FT_Free_Func>, realloc: Option<FT_Realloc_Func>, user: Option<*mut c_void>)
Set a new memory management object