[][src]Struct gfx::platform::freetype::font_template::FontTemplateData

pub struct FontTemplateData {
    pub bytes: Option<Vec<u8>>,
    pub identifier: Atom,
}

Platform specific font representation for Linux. The identifier is an absolute path, and the bytes field is the loaded data that can be passed to freetype and Raqote directly.

Fields

bytes: Option<Vec<u8>>identifier: Atom

Implementations

impl FontTemplateData[src]

pub fn new(
    identifier: Atom,
    bytes: Option<Vec<u8>>
) -> Result<FontTemplateData, Error>
[src]

pub fn bytes(&self) -> Vec<u8>[src]

Returns a clone of the data in this font. This may be a hugely expensive operation (depending on the platform) which performs synchronous disk I/O and should never be done lightly.

pub fn bytes_if_in_memory(&self) -> Option<Vec<u8>>[src]

Returns a clone of the bytes in this font if they are in memory. This function never performs disk I/O.

pub fn native_font(&self) -> Option<NativeFontHandle>[src]

Returns the native font that underlies this font template, if applicable.

Trait Implementations

impl Debug for FontTemplateData[src]

impl<'de> Deserialize<'de> for FontTemplateData[src]

impl Serialize for FontTemplateData[src]

Auto Trait Implementations

impl RefUnwindSafe for FontTemplateData

impl Send for FontTemplateData

impl Sync for FontTemplateData

impl Unpin for FontTemplateData

impl UnwindSafe for FontTemplateData

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Erased for T[src]

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

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

impl<T> MaybeBoxed<Box<T>> for T[src]

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

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

type Output = T

Should always be Self

impl<T> SetParameter for 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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]