[−][src]Struct rustybuzz::Font
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
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]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,