[][src]Struct directwrite::font::Font

#[repr(transparent)]
pub struct Font { /* fields omitted */ }

Represents a physical font in a font collection. This interface is used to create font faces from physical fonts, or to retrieve information such as font face metrics or face names from existing font faces.

Methods

impl Font[src]

pub fn create_face(&self) -> DWResult<FontFace>[src]

Creates a font face object for the font.

pub fn face_name(&self) -> Option<LocalizedStrings>[src]

It is unclear in what situations this method may fail to return a face names collection, and so is returned as an Option to be safe.

pub fn font_family(&self) -> Option<FontFamily>[src]

Gets the font family to which the specified font belongs.

pub fn informational_strings(
    &self,
    id: InformationalStringId
) -> Option<LocalizedStrings>
[src]

Gets a localized strings collection containing the specified informational strings, indexed by locale name.

pub fn metrics(&self) -> FontMetrics[src]

Get metric information for this Font.

pub fn simulations(&self) -> FontSimulations[src]

Get simulations applied to this Font.

pub fn stretch(&self) -> UncheckedEnum<FontStretch>[src]

Get the stretch value of this Font.

pub fn style(&self) -> UncheckedEnum<FontStyle>[src]

Get the style of this Font (Norma, Oblique, Italic).

pub fn weight(&self) -> FontWeight[src]

Get the weight of this Font.

pub fn has_character(&self, c: char) -> bool[src]

Check if a unicode codepoint is supported by this Font.

pub fn is_symbol_font(&self) -> bool[src]

Determines if this Font is a "Symbol" Font.

Trait Implementations

impl PartialEq<Font> for Font[src]

impl Sync for Font[src]

impl Clone for Font[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Send for Font[src]

impl Debug for Font[src]

impl ComWrapper for Font[src]

type Interface = IDWriteFont

The raw interface type from winapi

Blanket Implementations

impl<T> FontKey for T where
    T: Send + Sync + 'static + ?Sized
[src]

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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