pub struct Library { /* private fields */ }
Implementations
sourceimpl Library
impl Library
sourcepub fn init() -> FtResult<Self>
pub 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.
sourcepub fn new_face<P>(&self, path: P, face_index: isize) -> FtResult<Face> where
P: AsRef<OsStr>,
pub fn new_face<P>(&self, path: P, face_index: isize) -> FtResult<Face> 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.
pub fn new_stroker(&self) -> FtResult<Stroker>
sourcepub fn new_memory_face<T>(&self, buffer: T, face_index: isize) -> FtResult<Face> where
T: Into<Rc<Vec<u8>>>,
pub fn new_memory_face<T>(&self, buffer: T, face_index: isize) -> FtResult<Face> where
T: Into<Rc<Vec<u8>>>,
Similar to new_face
, but loads file data from a byte array in memory
sourcepub fn new_memory_face2<T>(
&self,
buffer: T,
face_index: isize
) -> FtResult<Face<T>> where
T: Borrow<[u8]>,
pub fn new_memory_face2<T>(
&self,
buffer: T,
face_index: isize
) -> FtResult<Face<T>> where
T: Borrow<[u8]>,
Similar to new_face
, but loads file data from a byte array in memory
pub fn set_lcd_filter(&self, lcd_filter: LcdFilter) -> FtResult<()>
sourcepub fn raw(&self) -> FT_Library
pub fn raw(&self) -> FT_Library
Get the underlying library object
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Library
impl !Send for Library
impl !Sync for Library
impl Unpin for Library
impl UnwindSafe for Library
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more