[−][src]Struct directwrite::font_collection::FontCollection
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]
K: FontKey,
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]
factory: &Factory,
check_for_updates: bool
) -> DWResult<FontCollection>
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]
fn eq(&self, other: &FontCollection) -> bool
[src]
fn ne(&self, other: &FontCollection) -> bool
[src]
impl Sync for FontCollection
[src]
impl Clone for FontCollection
[src]
fn clone(&self) -> 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
unsafe fn get_raw(&self) -> *mut IDWriteFontCollection
[src]
unsafe fn from_raw(ptr: *mut IDWriteFontCollection) -> Self
[src]
unsafe fn into_raw(self) -> *mut IDWriteFontCollection
[src]
unsafe fn from_ptr(ptr: ComPtr<IDWriteFontCollection>) -> Self
[src]
unsafe fn into_ptr(self) -> ComPtr<IDWriteFontCollection>
[src]
Blanket Implementations
impl<T> FontKey for T where
T: Send + Sync + 'static + ?Sized,
[src]
T: Send + Sync + 'static + ?Sized,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,