Struct flo_canvas::FontProperties
source · pub struct FontProperties {
pub style: FontStyle,
pub weight: u32,
}
Expand description
The properties to use when selecting a font face
Fields§
§style: FontStyle
§weight: u32
Implementations§
source§impl FontProperties
impl FontProperties
sourcepub fn with_weight(self, new_weight: u32) -> FontProperties
pub fn with_weight(self, new_weight: u32) -> FontProperties
Returns an updated font properties object with a new weight
sourcepub fn with_style(self, new_style: FontStyle) -> FontProperties
pub fn with_style(self, new_style: FontStyle) -> FontProperties
Returns an updated font properties object with a new style
Trait Implementations§
source§impl<'a> CanvasEncoding<String> for &'a FontProperties
impl<'a> CanvasEncoding<String> for &'a FontProperties
source§fn encode_canvas(&self, append_to: &mut String)
fn encode_canvas(&self, append_to: &mut String)
Encodes this item by appending it to the specified string
source§impl Clone for FontProperties
impl Clone for FontProperties
source§fn clone(&self) -> FontProperties
fn clone(&self) -> FontProperties
Returns a copy 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 moresource§impl Debug for FontProperties
impl Debug for FontProperties
source§impl Default for FontProperties
impl Default for FontProperties
source§fn default() -> FontProperties
fn default() -> FontProperties
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for FontProperties
impl<'de> Deserialize<'de> for FontProperties
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
source§impl PartialEq<FontProperties> for FontProperties
impl PartialEq<FontProperties> for FontProperties
source§fn eq(&self, other: &FontProperties) -> bool
fn eq(&self, other: &FontProperties) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.