[][src]Struct rustybuzz::Font

pub struct Font<'a> { /* fields omitted */ }

A font handle.

Combines hb_font_t, hb_face_t and hb_blob_t.

Implementations

impl<'a> Font<'a>[src]

pub fn from_data(data: &'a [u8], face_index: u32) -> Option<Self>[src]

Creates a new Font from data.

Data will be referenced, not owned.

pub fn scale(&self) -> (i32, i32)[src]

Returns the EM scale of the font.

pub fn set_scale(&mut self, x: i32, y: i32)[src]

Sets the EM scale of the font.

pub fn set_ptem(&mut self, v: f32)[src]

Sets point size per EM.

Used for optical-sizing in Apple fonts. A value of zero means "not set".

pub fn set_variations(&mut self, variations: &[Variation])[src]

Sets font variations.

Trait Implementations

impl<'_> Drop for Font<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Font<'a>

impl<'a> !Send for Font<'a>

impl<'a> !Sync for Font<'a>

impl<'a> Unpin for Font<'a>

impl<'a> UnwindSafe for Font<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.