pub struct FontArguments<'vp, 'p> { /* private fields */ }engine only.Expand description
Represents a set of actual arguments for a font.
Implementations§
Source§impl FontArguments<'_, '_>
impl FontArguments<'_, '_>
Sourcepub fn new() -> FontArguments<'_, '_>
pub fn new() -> FontArguments<'_, '_>
Creates default font arguments.
Sourcepub fn set_collection_index(
&mut self,
collection_index: usize,
) -> &mut FontArguments<'_, '_>
pub fn set_collection_index( &mut self, collection_index: usize, ) -> &mut FontArguments<'_, '_>
Specifies the index of the desired font.
Font formats like ttc, dfont, cff, cid, pfr, t42, t1, and fon may actually be indexed collections of fonts.
collection_indexindex of the font in an indexed collection.
Sourcepub fn set_variation_design_position(
self,
position: VariationPosition<'_>,
) -> FontArguments<'_, '_>
pub fn set_variation_design_position( self, position: VariationPosition<'_>, ) -> FontArguments<'_, '_>
Specifies a position in the variation design space.
Any axis not specified uses the default value. Any specified axis not actually present in the font is ignored.
This borrows position data; the value must remain valid for the lifetime of
FontArguments.
positionvariation coordinates to use.
Sourcepub fn collection_index(&self) -> usize
pub fn collection_index(&self) -> usize
Returns the index of the selected font in an indexed collection.
Sourcepub fn variation_design_position(&self) -> VariationPosition<'_>
pub fn variation_design_position(&self) -> VariationPosition<'_>
Returns the variation design position.
Sourcepub fn set_palette(self, palette: Palette<'_>) -> FontArguments<'_, '_>
pub fn set_palette(self, palette: Palette<'_>) -> FontArguments<'_, '_>
Specifies the color palette and optional palette entry overrides.
This borrows palette data; the value must remain valid for the lifetime of
FontArguments.
palettepalette index and override entries.
Sourcepub fn set_synthetic_bold(
&mut self,
synthetic_bold: impl Into<Option<bool>>,
) -> &mut FontArguments<'_, '_>
pub fn set_synthetic_bold( &mut self, synthetic_bold: impl Into<Option<bool>>, ) -> &mut FontArguments<'_, '_>
Sets whether synthetic bold styling is requested.
synthetic_boldSome(true)to force synthetic bold,Some(false)to force non-bold,Noneto leave unspecified.
Sourcepub fn synthetic_bold(&self) -> Option<bool>
pub fn synthetic_bold(&self) -> Option<bool>
Returns the synthetic bold preference, if specified.
Sourcepub fn set_synthetic_oblique(
&mut self,
synthetic_oblique: impl Into<Option<bool>>,
) -> &mut FontArguments<'_, '_>
pub fn set_synthetic_oblique( &mut self, synthetic_oblique: impl Into<Option<bool>>, ) -> &mut FontArguments<'_, '_>
Sets whether synthetic oblique styling is requested.
synthetic_obliqueSome(true)to force synthetic oblique,Some(false)to force non-oblique,Noneto leave unspecified.
Sourcepub fn synthetic_oblique(&self) -> Option<bool>
pub fn synthetic_oblique(&self) -> Option<bool>
Returns the synthetic oblique preference, if specified.
Trait Implementations§
Source§impl Debug for FontArguments<'_, '_>
impl Debug for FontArguments<'_, '_>
Source§impl Default for FontArguments<'_, '_>
impl Default for FontArguments<'_, '_>
Source§fn default() -> FontArguments<'_, '_>
fn default() -> FontArguments<'_, '_>
Source§impl Drop for FontArguments<'_, '_>
impl Drop for FontArguments<'_, '_>
Source§impl From<FontArguments<'_, '_>> for Handle<skia_textlayout_FontArguments>
impl From<FontArguments<'_, '_>> for Handle<skia_textlayout_FontArguments>
Source§fn from(fa: FontArguments<'_, '_>) -> Handle<skia_textlayout_FontArguments>
fn from(fa: FontArguments<'_, '_>) -> Handle<skia_textlayout_FontArguments>
Auto Trait Implementations§
impl<'vp, 'p> !Send for FontArguments<'vp, 'p>
impl<'vp, 'p> !Sync for FontArguments<'vp, 'p>
impl<'vp, 'p> Forget for FontArguments<'vp, 'p>
impl<'vp, 'p> Freeze for FontArguments<'vp, 'p>
impl<'vp, 'p> Move for FontArguments<'vp, 'p>
impl<'vp, 'p> RefUnwindSafe for FontArguments<'vp, 'p>
impl<'vp, 'p> Unpin for FontArguments<'vp, 'p>
impl<'vp, 'p> UnsafeUnpin for FontArguments<'vp, 'p>
impl<'vp, 'p> UnwindSafe for FontArguments<'vp, 'p>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Source§impl<N, T> NativeTransmutableWrapper<N> for Twhere
T: NativeTransmutable<N>,
impl<N, T> NativeTransmutableWrapper<N> for Twhere
T: NativeTransmutable<N>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().