FontWeight
struct · ferroui-base · v0.5.0
struct FontWeight
Defines a set of predefined font weights.
As defined by the OpenType specification, a font weight is any value in the range 1..=1000 (variable fonts and the OS/2 table produce values between the named ones), so this is an open set: a number with named constants.
Members
0ThinExtraLightUltraLightLightSemiLightNormalRegularMediumDemiBoldSemiBoldBoldExtraBoldUltraBoldBlackHeavySolidExtraBlackUltraBlackvaluetry_parse_ignore_case
0
0: i32
Thin
const Thin: FontWeight
Specifies a "thin" font weight.
ExtraLight
const ExtraLight: FontWeight
Specifies an "extra-light" font weight.
UltraLight
const UltraLight: FontWeight
Specifies an "ultra-light" font weight.
Light
const Light: FontWeight
Specifies a "light" font weight.
SemiLight
const SemiLight: FontWeight
Specifies a "semi-light" font weight.
Normal
const Normal: FontWeight
Specifies a "normal" font weight.
Regular
const Regular: FontWeight
Specifies a "regular" font weight.
Medium
const Medium: FontWeight
Specifies a "medium" font weight.
DemiBold
const DemiBold: FontWeight
Specifies a "demi-bold" font weight.
SemiBold
const SemiBold: FontWeight
Specifies a "semi-bold" font weight.
Bold
const Bold: FontWeight
Specifies a "bold" font weight.
ExtraBold
const ExtraBold: FontWeight
Specifies an "extra-bold" font weight.
UltraBold
const UltraBold: FontWeight
Specifies an "ultra-bold" font weight.
Black
const Black: FontWeight
Specifies a "black" font weight.
Heavy
const Heavy: FontWeight
Specifies a "heavy" font weight.
Solid
const Solid: FontWeight
Specifies a "solid" font weight.
ExtraBlack
const ExtraBlack: FontWeight
Specifies an "extra-black" font weight.
UltraBlack
const UltraBlack: FontWeight
Specifies an "ultra-black" font weight.
value
const fn value(self: Self) -> i32
The numeric weight (C# (int)weight).
try_parse_ignore_case
fn try_parse_ignore_case(s: &str) -> Option<Self>
Parses a weight name, ignoring case (C# Enum.TryParse(token, true, ..)
restricted to names; numbers are handled by FromStr).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneCopyStructuralPartialEqPartialEqEqHashPartialOrdOrdDefaultDisplayDebugFromStrFrom<i32>MarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.