[−][src]Struct directwrite::font::Font
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]
&self,
id: InformationalStringId
) -> Option<LocalizedStrings>
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(&self) -> 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
unsafe fn get_raw(&self) -> *mut IDWriteFont
[src]
unsafe fn from_raw(ptr: *mut IDWriteFont) -> Self
[src]
unsafe fn into_raw(self) -> *mut IDWriteFont
[src]
unsafe fn from_ptr(ptr: ComPtr<IDWriteFont>) -> Self
[src]
unsafe fn into_ptr(self) -> ComPtr<IDWriteFont>
[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,