Struct i_slint_core::graphics::FontRequest
source · [−]pub struct FontRequest {
pub family: Option<SharedString>,
pub weight: Option<i32>,
pub pixel_size: Option<f32>,
pub letter_spacing: Option<f32>,
}
Expand description
FontRequest collects all the developer-configurable properties for fonts, such as family, weight, etc.
It is submitted as a request to the platform font system (i.e. CoreText on macOS) and in exchange the
backend returns a Box
Fields
family: Option<SharedString>
The name of the font family to be used, such as “Helvetica”. An empty family name means the system default font family should be used.
weight: Option<i32>
If the weight is None, the system default font weight should be used.
pixel_size: Option<f32>
If the pixel size is None, the system default font size should be used.
letter_spacing: Option<f32>
The additional spacing (or shrinking if negative) between glyphs. This is usually not submitted to the font-subsystem but collected here for API convenience
Implementations
sourceimpl FontRequest
impl FontRequest
sourcepub fn merge(self, other: &FontRequest) -> Self
pub fn merge(self, other: &FontRequest) -> Self
Consumes the FontRequest, replaces any missing fields from the specified other request and returns the new request.
Trait Implementations
sourceimpl Clone for FontRequest
impl Clone for FontRequest
sourcefn clone(&self) -> FontRequest
fn clone(&self) -> FontRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FontRequest
impl Debug for FontRequest
sourceimpl Default for FontRequest
impl Default for FontRequest
sourcefn default() -> FontRequest
fn default() -> FontRequest
Returns the “default value” for a type. Read more
sourceimpl PartialEq<FontRequest> for FontRequest
impl PartialEq<FontRequest> for FontRequest
sourcefn eq(&self, other: &FontRequest) -> bool
fn eq(&self, other: &FontRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &FontRequest) -> bool
fn ne(&self, other: &FontRequest) -> bool
This method tests for !=
.
impl StructuralPartialEq for FontRequest
Auto Trait Implementations
impl RefUnwindSafe for FontRequest
impl Send for FontRequest
impl !Sync for FontRequest
impl Unpin for FontRequest
impl UnwindSafe for FontRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more