[−][src]Struct directwrite::font_face::FontFace
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]
&self,
glyph_indices: &[u16],
is_sideways: bool
) -> DWResult<Vec<GlyphMetrics>>
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]
&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<()>
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]
&self,
em_size: f32,
pixels_per_dip: f32,
measuring_mode: MeasuringMode,
params: &RenderingParams
) -> DWResult<UncheckedEnum<RenderingMode>>
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]
&self,
em_size: f32,
pixels_per_dip: f32,
transform: Option<&Matrix3x2f>,
use_gdi_natural: bool,
glyph_indices: &[u16],
is_sideways: bool
) -> DWResult<Vec<GlyphMetrics>>
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]
&self,
em_size: f32,
pixels_per_dip: f32,
transform: Option<&Matrix3x2f>
) -> DWResult<FontMetrics>
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]
&'a self,
tag: impl Into<FontFeatureTag>
) -> Option<FontTable<'a>>
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(&self) -> 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
unsafe fn get_raw(&self) -> *mut IDWriteFontFace
[src]
unsafe fn from_raw(ptr: *mut IDWriteFontFace) -> Self
[src]
unsafe fn into_raw(self) -> *mut IDWriteFontFace
[src]
unsafe fn from_ptr(ptr: ComPtr<IDWriteFontFace>) -> Self
[src]
unsafe fn into_ptr(self) -> ComPtr<IDWriteFontFace>
[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,