#[non_exhaustive]pub struct Font(/* private fields */);Expand description
Font configuration for text rendering.
This struct defines all the visual properties that can be applied to text, including size, styling, and decorations.
Implementations§
Source§impl Font
impl Font
Sourcepub fn new(font: impl Resolvable<Resolved = ResolvedFont> + 'static) -> Self
pub fn new(font: impl Resolvable<Resolved = ResolvedFont> + 'static) -> Self
Creates a new font from a resolvable value.
Sourcepub fn weight(self, weight: FontWeight) -> Self
pub fn weight(self, weight: FontWeight) -> Self
Sets the font weight.
Sourcepub fn bold(self) -> Self
pub fn bold(self) -> Self
Sets the font to bold weight.
Equal to calling font.weight(FontWeight::Bold).
Sourcepub fn resolve(&self, env: &Environment) -> Computed<ResolvedFont>
pub fn resolve(&self, env: &Environment) -> Computed<ResolvedFont>
Resolves the font in the given environment.
Trait Implementations§
Source§impl From<Subheadline> for Font
impl From<Subheadline> for Font
Source§fn from(value: Subheadline) -> Self
fn from(value: Subheadline) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Font
impl !RefUnwindSafe for Font
impl !Send for Font
impl !Sync for Font
impl Unpin for Font
impl !UnwindSafe for Font
Blanket Implementations§
Source§impl<S> AnimationExt for Swhere
S: SignalExt,
impl<S> AnimationExt for Swhere
S: SignalExt,
Source§fn animated(self) -> WithMetadata<Self, Animation>where
Self: Sized,
fn animated(self) -> WithMetadata<Self, Animation>where
Self: Sized,
Apply default animation to this reactive value Read more
Source§fn with_animation(self, animation: Animation) -> WithMetadata<Self, Animation>where
Self: Sized,
fn with_animation(self, animation: Animation) -> WithMetadata<Self, Animation>where
Self: Sized,
Apply a specific animation to this reactive value Read more
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IdentifiableExt for T
impl<T> IdentifiableExt for T
Source§impl<C, Output> IntoSignal<Output> for C
impl<C, Output> IntoSignal<Output> for C
Source§impl<C> SignalExt for Cwhere
C: Signal,
impl<C> SignalExt for Cwhere
C: Signal,
Source§fn map<F, Output>(self, f: F) -> Map<Self, F, Output>
fn map<F, Output>(self, f: F) -> Map<Self, F, Output>
Transforms the output of this signal using the provided function.
Source§fn cached(self) -> Cached<Self>
fn cached(self) -> Cached<Self>
Wraps this signal with caching to avoid redundant computations.
Source§fn computed(self) -> Computed<Self::Output>where
Self: 'static,
fn computed(self) -> Computed<Self::Output>where
Self: 'static,
Converts this signal into a type-erased
Computed container.Source§fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
fn with<T>(self, metadata: T) -> WithMetadata<Self, T>
Attaches metadata to this signal’s watcher notifications.