pub struct FontDescriptor {Show 17 fields
pub font_name: String,
pub font_family: Option<String>,
pub font_stretch: Option<String>,
pub font_weight: Option<i32>,
pub flags: FontFlags,
pub font_bbox: [f64; 4],
pub italic_angle: f64,
pub ascent: f64,
pub descent: f64,
pub leading: Option<f64>,
pub cap_height: f64,
pub x_height: Option<f64>,
pub stem_v: f64,
pub stem_h: Option<f64>,
pub avg_width: Option<f64>,
pub max_width: Option<f64>,
pub missing_width: Option<f64>,
}Expand description
Font descriptor for custom fonts
Fields§
§font_name: StringFont name
font_family: Option<String>Font family
font_stretch: Option<String>Font stretch
font_weight: Option<i32>Font weight
flags: FontFlagsFont flags
font_bbox: [f64; 4]Font bounding box [llx lly urx ury]
italic_angle: f64Italic angle in degrees
ascent: f64Ascent (maximum height above baseline)
descent: f64Descent (maximum depth below baseline)
leading: Option<f64>Leading (spacing between lines)
cap_height: f64Capital height
x_height: Option<f64>X-height (height of lowercase x)
stem_v: f64Stem width
stem_h: Option<f64>Horizontal stem width
avg_width: Option<f64>Average width of glyphs
max_width: Option<f64>Maximum width of glyphs
missing_width: Option<f64>Width of missing character
Implementations§
Trait Implementations§
Source§impl Clone for FontDescriptor
impl Clone for FontDescriptor
Source§fn clone(&self) -> FontDescriptor
fn clone(&self) -> FontDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FontDescriptor
impl RefUnwindSafe for FontDescriptor
impl Send for FontDescriptor
impl Sync for FontDescriptor
impl Unpin for FontDescriptor
impl UnsafeUnpin for FontDescriptor
impl UnwindSafe for FontDescriptor
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§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>
Converts
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>
Converts
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 more