pub struct Font {
pub size: Size,
pub offset: Delta<i8>,
pub glyph_offset: Delta<i8>,
/* private fields */
}
Expand description
Font config
Defaults are provided at the level of this struct per platform, but not per field in this struct. It might be nice in the future to have defaults for each value independently. Alternatively, maybe erroring when the user doesn’t provide complete config is Ok.
Fields§
§size: Size
Font size in points
offset: Delta<i8>
Extra spacing per character
glyph_offset: Delta<i8>
Glyph offset within character cell
Implementations§
Source§impl Font
impl Font
pub fn normal(&self) -> &FontDescription
pub fn bold(&self) -> FontDescription
pub fn italic(&self) -> FontDescription
pub fn bold_italic(&self) -> FontDescription
pub fn use_thin_strokes(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Font
impl<'de> Deserialize<'de> for Font
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Font
impl StructuralPartialEq for Font
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<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)