Struct freetype::face::Face

source ·
pub struct Face<BYTES = Rc<Vec<u8>>> { /* private fields */ }

Implementations§

source§

impl<BYTES> Face<BYTES>

source

pub unsafe fn from_raw( library_raw: FT_Library, raw: FT_Face, bytes: Option<BYTES> ) -> Self

source

pub fn attach_file(&self, filepathname: &str) -> FtResult<()>

source

pub fn reference(&self) -> FtResult<()>

source

pub fn set_char_size( &self, char_width: isize, char_height: isize, horz_resolution: u32, vert_resolution: u32 ) -> FtResult<()>

source

pub fn set_pixel_sizes( &self, pixel_width: u32, pixel_height: u32 ) -> FtResult<()>

source

pub fn load_glyph(&self, glyph_index: u32, load_flags: LoadFlag) -> FtResult<()>

source

pub fn load_char(&self, char_code: usize, load_flags: LoadFlag) -> FtResult<()>

source

pub fn set_transform(&self, matrix: &mut Matrix, delta: &mut Vector)

source

pub fn get_char_index(&self, charcode: usize) -> u32

source

pub fn get_kerning( &self, left_char_index: u32, right_char_index: u32, kern_mode: KerningMode ) -> FtResult<Vector>

source

pub fn glyph(&self) -> &GlyphSlot

source

pub fn has_horizontal(&self) -> bool

source

pub fn has_vertical(&self) -> bool

source

pub fn has_kerning(&self) -> bool

source

pub fn is_scalable(&self) -> bool

source

pub fn is_sfnt(&self) -> bool

source

pub fn is_fixed_width(&self) -> bool

source

pub fn has_fixed_sizes(&self) -> bool

source

pub fn has_glyph_names(&self) -> bool

source

pub fn is_cid_keyed(&self) -> bool

source

pub fn is_tricky(&self) -> bool

source

pub fn has_color(&self) -> bool

source

pub fn raw(&self) -> &FT_FaceRec

source

pub fn raw_mut(&mut self) -> &mut FT_FaceRec

source

pub fn ascender(&self) -> FT_Short

source

pub fn descender(&self) -> FT_Short

source

pub fn em_size(&self) -> FT_Short

source

pub fn height(&self) -> FT_Short

source

pub fn max_advance_width(&self) -> FT_Short

source

pub fn max_advance_height(&self) -> FT_Short

source

pub fn underline_position(&self) -> FT_Short

source

pub fn underline_thickness(&self) -> FT_Short

source

pub fn num_faces(&self) -> FT_Short

source

pub fn num_glyphs(&self) -> FT_Long

source

pub fn family_name(&self) -> Option<String>

source

pub fn style_name(&self) -> Option<String>

source

pub fn style_flags(&self) -> StyleFlag

source

pub fn size_metrics(&self) -> Option<FT_Size_Metrics>

source

pub fn postscript_name(&self) -> Option<String>

Trait Implementations§

source§

impl<BYTES: Clone> Clone for Face<BYTES>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<BYTES> Debug for Face<BYTES>

source§

fn fmt(&self, form: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<BYTES> Drop for Face<BYTES>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<BYTES: Hash> Hash for Face<BYTES>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<BYTES: PartialEq> PartialEq<Face<BYTES>> for Face<BYTES>

source§

fn eq(&self, other: &Face<BYTES>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<BYTES: Eq> Eq for Face<BYTES>

source§

impl<BYTES> StructuralEq for Face<BYTES>

source§

impl<BYTES> StructuralPartialEq for Face<BYTES>

Auto Trait Implementations§

§

impl<BYTES> RefUnwindSafe for Face<BYTES>where BYTES: RefUnwindSafe,

§

impl<BYTES = Rc<Vec<u8, Global>>> !Send for Face<BYTES>

§

impl<BYTES = Rc<Vec<u8, Global>>> !Sync for Face<BYTES>

§

impl<BYTES> Unpin for Face<BYTES>where BYTES: Unpin,

§

impl<BYTES> UnwindSafe for Face<BYTES>where BYTES: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.