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 (backlog F97).
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§fn clone(&self) -> SystemFont
fn clone(&self) -> SystemFont
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
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
key and return true if they are equal.