[][src]Struct directwrite::font_face::FontFace

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

Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.

Methods

impl FontFace[src]

pub fn create<'a, 'b>(factory: &'a Factory) -> FontFaceBuilder<'a, 'b>[src]

Initializes a builder for creating a FontFace

pub fn design_glyph_metrics(
    &self,
    glyph_indices: &[u16],
    is_sideways: bool
) -> DWResult<Vec<GlyphMetrics>>
[src]

Obtains ideal (resolution-independent) glyph metrics in font design units.

pub fn files(&self) -> DWResult<Vec<FontFile>>[src]

Obtains the font files representing a font face.

pub fn glyph_count(&self) -> u16[src]

Obtains the number of glyphs in the font face.

pub fn glyph_indices(&self, code_points: &[u32]) -> DWResult<Vec<u16>>[src]

Returns the nominal mapping of UCS4 Unicode code points to glyph indices as defined by the font 'CMAP' table.

pub fn glyph_run_outline(
    &self,
    em_size: f32,
    glyph_indices: &[u16],
    glyph_advances: Option<&[f32]>,
    glyph_offsets: Option<&[GlyphOffset]>,
    is_sideways: bool,
    is_rtl: bool,
    geometry_sink: impl GeometrySink
) -> DWResult<()>
[src]

Computes the outline of a run of glyphs by calling back to the outline sink interface. If glyph_advances and/or glyph_offsets are provided, they must be the same length as glyph_indices, or the function will panic.

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

Obtains the index of a font face in the context of its font files.

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

Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations.

pub fn recommended_rendering_mode(
    &self,
    em_size: f32,
    pixels_per_dip: f32,
    measuring_mode: MeasuringMode,
    params: &RenderingParams
) -> DWResult<UncheckedEnum<RenderingMode>>
[src]

Attempt to determine the recommended rendering mode for this font face with the given parameters.

pub fn font_type(&self) -> UncheckedEnum<FontFaceType>[src]

Obtains the file format type of a font face.

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

Obtains the algorithmic style simulation flags of a font face.

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

Determines whether the font is a symbol font.

pub fn gdi_compatible_glyph_metrics(
    &self,
    em_size: f32,
    pixels_per_dip: f32,
    transform: Option<&Matrix3x2f>,
    use_gdi_natural: bool,
    glyph_indices: &[u16],
    is_sideways: bool
) -> DWResult<Vec<GlyphMetrics>>
[src]

Obtains glyph metrics in font design units with the return values compatible with what GDI would produce.

pub fn gdi_compatible_metrics(
    &self,
    em_size: f32,
    pixels_per_dip: f32,
    transform: Option<&Matrix3x2f>
) -> DWResult<FontMetrics>
[src]

Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.

pub fn font_table<'a>(
    &'a self,
    tag: impl Into<FontFeatureTag>
) -> Option<FontTable<'a>>
[src]

Finds the specified OpenType font table if it exists and returns a pointer to it. The function accesses the underlying font data through the IDWriteFontFileStream interface implemented by the font file loader.

Trait Implementations

impl PartialEq<FontFace> for FontFace[src]

impl Sync for FontFace[src]

impl Clone for FontFace[src]

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

Performs copy-assignment from source. Read more

impl Send for FontFace[src]

impl Debug for FontFace[src]

impl ComWrapper for FontFace[src]

type Interface = IDWriteFontFace

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]