pub struct TextShaperOptions { /* private fields */ }Expand description
Options to customize text shaping.
Implementations§
Source§impl TextShaperOptions
impl TextShaperOptions
Sourcepub fn new(typeface: Rc<GlyphTypeface>) -> Self
pub fn new(typeface: Rc<GlyphTypeface>) -> Self
Creates options with the default em size, bidi level 0 and no culture, tab width, letter spacing or features.
Sourcepub fn with_all(
typeface: Rc<GlyphTypeface>,
font_rendering_em_size: f64,
bidi_level: i8,
culture: Option<CultureInfo>,
incremental_tab_width: f64,
letter_spacing: f64,
font_features: Option<Rc<Vec<FontFeature>>>,
) -> Self
pub fn with_all( typeface: Rc<GlyphTypeface>, font_rendering_em_size: f64, bidi_level: i8, culture: Option<CultureInfo>, incremental_tab_width: f64, letter_spacing: f64, font_features: Option<Rc<Vec<FontFeature>>>, ) -> Self
Creates options with every value specified.
Sourcepub fn glyph_typeface(&self) -> &Rc<GlyphTypeface>
pub fn glyph_typeface(&self) -> &Rc<GlyphTypeface>
Get the typeface.
Sourcepub fn font_rendering_em_size(&self) -> f64
pub fn font_rendering_em_size(&self) -> f64
Get the font rendering em size.
Sourcepub fn bidi_level(&self) -> i8
pub fn bidi_level(&self) -> i8
Get the bidi level of the text.
Sourcepub fn culture(&self) -> Option<&CultureInfo>
pub fn culture(&self) -> Option<&CultureInfo>
Get the culture.
Sourcepub fn incremental_tab_width(&self) -> f64
pub fn incremental_tab_width(&self) -> f64
Get the incremental tab width.
Sourcepub fn letter_spacing(&self) -> f64
pub fn letter_spacing(&self) -> f64
Get the letter spacing.
Sourcepub fn font_features(&self) -> Option<&Rc<Vec<FontFeature>>>
pub fn font_features(&self) -> Option<&Rc<Vec<FontFeature>>>
Get features.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TextShaperOptions
impl !Send for TextShaperOptions
impl !Sync for TextShaperOptions
impl !UnwindSafe for TextShaperOptions
impl Freeze for TextShaperOptions
impl Unpin for TextShaperOptions
impl UnsafeUnpin for TextShaperOptions
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more