# FontWeight

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/struct-fontweight/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
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.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L12)

## Members

- [`0`](#struct_field-0)
- [`Thin`](#assoc_const-thin)
- [`ExtraLight`](#assoc_const-extralight)
- [`UltraLight`](#assoc_const-ultralight)
- [`Light`](#assoc_const-light)
- [`SemiLight`](#assoc_const-semilight)
- [`Normal`](#assoc_const-normal)
- [`Regular`](#assoc_const-regular)
- [`Medium`](#assoc_const-medium)
- [`DemiBold`](#assoc_const-demibold)
- [`SemiBold`](#assoc_const-semibold)
- [`Bold`](#assoc_const-bold)
- [`ExtraBold`](#assoc_const-extrabold)
- [`UltraBold`](#assoc_const-ultrabold)
- [`Black`](#assoc_const-black)
- [`Heavy`](#assoc_const-heavy)
- [`Solid`](#assoc_const-solid)
- [`ExtraBlack`](#assoc_const-extrablack)
- [`UltraBlack`](#assoc_const-ultrablack)
- [`value`](#function-value)
- [`try_parse_ignore_case`](#function-try_parse_ignore_case)

<a id="struct_field-0"></a>

### 0

```rust
0: i32
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L12)

<a id="assoc_const-thin"></a>

### Thin

```rust
const Thin: FontWeight
```

Specifies a "thin" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L17)

<a id="assoc_const-extralight"></a>

### ExtraLight

```rust
const ExtraLight: FontWeight
```

Specifies an "extra-light" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L19)

<a id="assoc_const-ultralight"></a>

### UltraLight

```rust
const UltraLight: FontWeight
```

Specifies an "ultra-light" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L21)

<a id="assoc_const-light"></a>

### Light

```rust
const Light: FontWeight
```

Specifies a "light" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L23)

<a id="assoc_const-semilight"></a>

### SemiLight

```rust
const SemiLight: FontWeight
```

Specifies a "semi-light" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L25)

<a id="assoc_const-normal"></a>

### Normal

```rust
const Normal: FontWeight
```

Specifies a "normal" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L27)

<a id="assoc_const-regular"></a>

### Regular

```rust
const Regular: FontWeight
```

Specifies a "regular" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L29)

<a id="assoc_const-medium"></a>

### Medium

```rust
const Medium: FontWeight
```

Specifies a "medium" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L31)

<a id="assoc_const-demibold"></a>

### DemiBold

```rust
const DemiBold: FontWeight
```

Specifies a "demi-bold" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L33)

<a id="assoc_const-semibold"></a>

### SemiBold

```rust
const SemiBold: FontWeight
```

Specifies a "semi-bold" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L35)

<a id="assoc_const-bold"></a>

### Bold

```rust
const Bold: FontWeight
```

Specifies a "bold" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L37)

<a id="assoc_const-extrabold"></a>

### ExtraBold

```rust
const ExtraBold: FontWeight
```

Specifies an "extra-bold" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L39)

<a id="assoc_const-ultrabold"></a>

### UltraBold

```rust
const UltraBold: FontWeight
```

Specifies an "ultra-bold" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L41)

<a id="assoc_const-black"></a>

### Black

```rust
const Black: FontWeight
```

Specifies a "black" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L43)

<a id="assoc_const-heavy"></a>

### Heavy

```rust
const Heavy: FontWeight
```

Specifies a "heavy" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L45)

<a id="assoc_const-solid"></a>

### Solid

```rust
const Solid: FontWeight
```

Specifies a "solid" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L47)

<a id="assoc_const-extrablack"></a>

### ExtraBlack

```rust
const ExtraBlack: FontWeight
```

Specifies an "extra-black" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L49)

<a id="assoc_const-ultrablack"></a>

### UltraBlack

```rust
const UltraBlack: FontWeight
```

Specifies an "ultra-black" font weight.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L51)

<a id="function-value"></a>

### value

```rust
const fn value(self: Self) -> i32
```

The numeric weight (C# `(int)weight`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L76)

<a id="function-try_parse_ignore_case"></a>

### try_parse_ignore_case

```rust
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`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/font_weight.rs#L82)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `PartialOrd`
- `Ord`
- `Default`
- `Display`
- `Debug`
- `FromStr`
- `From<i32>`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
