pub struct FontFace { /* private fields */ }Implementations§
Source§impl FontFace
impl FontFace
pub fn take(native: ComPtr<IDWriteFontFace>) -> FontFace
pub unsafe fn as_ptr(&self) -> *mut IDWriteFontFace
pub fn get_files(&self) -> Vec<FontFile>
👎Deprecated: Use
files instead.pub fn files(&self) -> Result<Vec<FontFile>, HRESULT>
pub fn create_font_face_with_simulations( &self, simulations: DWRITE_FONT_SIMULATIONS, ) -> FontFace
pub fn get_glyph_count(&self) -> u16
pub fn metrics(&self) -> FontMetrics
pub fn get_glyph_indices(&self, code_points: &[u32]) -> Vec<u16>
👎Deprecated: Use
glyph_indices instead.pub fn glyph_indices(&self, code_points: &[u32]) -> Result<Vec<u16>, HRESULT>
pub fn get_design_glyph_metrics( &self, glyph_indices: &[u16], is_sideways: bool, ) -> Vec<DWRITE_GLYPH_METRICS>
👎Deprecated: Use
design_glyph_metrics instead.pub fn design_glyph_metrics( &self, glyph_indices: &[u16], is_sideways: bool, ) -> Result<Vec<DWRITE_GLYPH_METRICS>, HRESULT>
pub fn get_gdi_compatible_glyph_metrics( &self, em_size: f32, pixels_per_dip: f32, transform: *const DWRITE_MATRIX, use_gdi_natural: bool, glyph_indices: &[u16], is_sideways: bool, ) -> Vec<DWRITE_GLYPH_METRICS>
👎Deprecated: Use
gdi_compatible_glyph_metrics instead.pub fn gdi_compatible_glyph_metrics( &self, em_size: f32, pixels_per_dip: f32, transform: *const DWRITE_MATRIX, use_gdi_natural: bool, glyph_indices: &[u16], is_sideways: bool, ) -> Result<Vec<DWRITE_GLYPH_METRICS>, HRESULT>
pub fn get_font_table(&self, opentype_table_tag: u32) -> Option<Vec<u8>>
👎Deprecated: Use
font_table instead.Sourcepub fn font_table(
&self,
opentype_table_tag: u32,
) -> Result<Option<Vec<u8>>, HRESULT>
pub fn font_table( &self, opentype_table_tag: u32, ) -> Result<Option<Vec<u8>>, HRESULT>
Returns the contents of the OpenType table with the given tag.
NB: The bytes of the tag are reversed! You probably want to use the u32::swap_bytes()
method on the tag value before calling this method.
pub fn get_recommended_rendering_mode( &self, em_size: f32, pixels_per_dip: f32, measure_mode: DWRITE_MEASURING_MODE, rendering_params: *mut IDWriteRenderingParams, ) -> DWRITE_RENDERING_MODE
pub fn get_recommended_rendering_mode_default_params( &self, em_size: f32, pixels_per_dip: f32, measure_mode: DWRITE_MEASURING_MODE, ) -> DWRITE_RENDERING_MODE
pub fn get_glyph_run_outline( &self, em_size: f32, glyph_indices: &[u16], glyph_advances: Option<&[f32]>, glyph_offsets: Option<&[DWRITE_GLYPH_OFFSET]>, is_sideways: bool, is_right_to_left: bool, outline_builder: Box<dyn OutlineBuilder>, )
👎Deprecated: Use
glyph_run_outline instead.pub fn glyph_run_outline( &self, em_size: f32, glyph_indices: &[u16], glyph_advances: Option<&[f32]>, glyph_offsets: Option<&[DWRITE_GLYPH_OFFSET]>, is_sideways: bool, is_right_to_left: bool, outline_builder: Box<dyn OutlineBuilder>, ) -> Result<(), GlyphRunOutlineError>
pub fn has_kerning_pairs(&self) -> bool
pub fn get_glyph_pair_kerning_adjustment( &self, first_glyph: u16, second_glyph: u16, ) -> i32
👎Deprecated: Use
glyph_pair_kerning_adjustment instead.pub fn glyph_pair_kerning_adjustment( &self, first_glyph: u16, second_glyph: u16, ) -> Result<i32, HRESULT>
pub fn get_type(&self) -> FontFaceType
pub fn get_index(&self) -> u32
pub fn has_variations(&self) -> bool
Sourcepub fn variations(&self) -> Result<Vec<DWRITE_FONT_AXIS_VALUE>, HRESULT>
pub fn variations(&self) -> Result<Vec<DWRITE_FONT_AXIS_VALUE>, HRESULT>
If this font has variations, return a [Vec<DWRITE_FONT_AXIS_VALUE] of the
variation axes and their values. If the font does not have variations,
return an empty Vec.
pub fn create_font_face_with_variations( &self, simulations: DWRITE_FONT_SIMULATIONS, axis_values: &[DWRITE_FONT_AXIS_VALUE], ) -> Option<FontFace>
pub fn simulations(&self) -> FontSimulations
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FontFace
impl !RefUnwindSafe for FontFace
impl !Send for FontFace
impl !Sync for FontFace
impl Unpin for FontFace
impl UnwindSafe for FontFace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more