[−][src]Struct ndless_freetype::library::Library
Methods
impl Library
[src]
pub fn init() -> FtResult<Self>
[src]
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.
pub fn new_face(
&self,
path: impl Into<String>,
face_index: isize
) -> FtResult<Face>
[src]
&self,
path: impl Into<String>,
face_index: isize
) -> FtResult<Face>
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>
[src]
pub fn new_memory_face(
&self,
buffer: impl Into<Rc<Vec<u8>>>,
face_index: isize
) -> FtResult<Face>
[src]
&self,
buffer: impl Into<Rc<Vec<u8>>>,
face_index: isize
) -> FtResult<Face>
Similar to new_face
, but loads file data from a byte array in memory
pub fn new_static_face(
&self,
buffer: &'static [u8],
face_index: isize
) -> FtResult<Face>
[src]
&self,
buffer: &'static [u8],
face_index: isize
) -> FtResult<Face>
Similar to new_memory_face
, but uses statically-available memory
pub fn set_lcd_filter(&self, lcd_filter: LcdFilter) -> FtResult<()>
[src]
pub fn raw(&self) -> FT_Library
[src]
Get the underlying library object
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,