[][src]Struct directwrite::font_collection::FontCollection

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

An object that encapsulates a set of fonts, such as the set of fonts installed on the system, or the set of fonts in a particular directory. The font collection API can be used to discover what font families and fonts are available, and to obtain some metadata about the fonts.

Methods

impl FontCollection[src]

pub fn create<'a, K>(factory: &'a Factory) -> FontCollectionBuilder<'a, K> where
    K: FontKey
[src]

Construct a builder for a FontCollection. You'll need a CollectionLoaderHandle and its associated Key type.

pub fn system_font_collection(
    factory: &Factory,
    check_for_updates: bool
) -> DWResult<FontCollection>
[src]

Gets the FontCollection for System-installed fonts. This represents all of the fonts installed on the user's system.

pub fn find_family_by_name(&self, family_name: &str) -> Option<u32>[src]

Finds the font family with the specified family name and returns its index

pub fn family_count(&self) -> u32[src]

Gets the number of font families in the collection

pub fn family(&self, index: u32) -> Option<FontFamily>[src]

Gets a FontFamily object given a zero-based font family index

pub fn all_families<'a>(&'a self) -> impl Iterator<Item = FontFamily> + 'a[src]

Get an iterator of all font families in this collection

pub fn font_from_face(&self, face: &FontFace) -> Option<Font>[src]

Gets the font object that corresponds to the same physical font as the specified font face object. The specified physical font must belong to the font collection.

Trait Implementations

impl PartialEq<FontCollection> for FontCollection[src]

impl Sync for FontCollection[src]

impl Clone for FontCollection[src]

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

Performs copy-assignment from source. Read more

impl Send for FontCollection[src]

impl Debug for FontCollection[src]

impl ComWrapper for FontCollection[src]

type Interface = IDWriteFontCollection

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]