pub struct SystemFont {
pub family: String,
pub monospaced: bool,
pub weights: Vec<u16>,
pub italic: bool,
}Expand description
One family of the font database — installed or loaded — as its faces
describe it, from what the database read off each face’s tables when
it was scanned: nothing is loaded or shaped to answer.
What Core::system_fonts lists, one per
family.
Fields§
§family: StringThe family name Core::add_system_font
takes.
monospaced: boolEvery face of the family says it is fixed-pitch (the post table’s
isFixedPitch): a monospaced family. Measuring glyph widths instead
loads and shapes every file, and calls a symbol font whose glyphs
happen to share an advance monospaced.
weights: Vec<u16>The weights its faces come in, on the CSS scale (400 regular, 700
bold) as each face’s OS/2 table says it — sorted, each once. A
variable font’s face reads as its default instance.
italic: boolIt has an italic or an oblique face.
Trait Implementations§
Source§impl Clone for SystemFont
impl Clone for SystemFont
Source§impl Debug for SystemFont
impl Debug for SystemFont
impl Eq for SystemFont
Source§impl PartialEq for SystemFont
impl PartialEq for SystemFont
impl StructuralPartialEq for SystemFont
Auto Trait Implementations§
impl Freeze for SystemFont
impl RefUnwindSafe for SystemFont
impl Send for SystemFont
impl Sync for SystemFont
impl Unpin for SystemFont
impl UnsafeUnpin for SystemFont
impl UnwindSafe for SystemFont
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.