# FontFeature

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

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

```rust
struct FontFeature
```

Font feature.

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

## Members

- [`tag`](#struct_field-tag)
- [`value`](#struct_field-value)
- [`start`](#struct_field-start)
- [`end`](#struct_field-end)
- [`parse`](#function-parse)

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

### tag

```rust
tag: String
```

Gets or sets the tag.

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

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

### value

```rust
value: i32
```

Gets or sets the value.

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

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

### start

```rust
start: i32
```

Gets or sets the start.

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

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

### end

```rust
end: i32
```

Gets or sets the end.

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

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

### parse

```rust
fn parse(s: &str) -> FontFeature
```

Parses a string to return a `FontFeature`.

Syntax is the following:

* Syntax — Value — Start — End
* `kern` — 1 — 0 — ∞ — Turn feature on
* `+kern` — 1 — 0 — ∞ — Turn feature on
* `-kern` — 0 — 0 — ∞ — Turn feature off
* `kern=0` — 0 — 0 — ∞ — Turn feature off
* `kern=1` — 1 — 0 — ∞ — Turn feature on
* `aalt=2` — 2 — 0 — ∞ — Choose 2nd alternate
* `kern[]` — 1 — 0 — ∞ — Turn feature on
* `kern[:]` — 1 — 0 — ∞ — Turn feature on
* `kern[5:]` — 1 — 5 — ∞ — Turn feature on, partial
* `kern[:5]` — 1 — 0 — 5 — Turn feature on, partial
* `kern[3:5]` — 1 — 3 — 5 — Turn feature on, range
* `kern[3]` — 1 — 3 — 3+1 — Turn feature on, single char
* `aalt[3:5]=2` — 2 — 3 — 5 — Turn 2nd alternate on for range

A string that does not match gives the default (empty tag) feature.

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

## 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`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Default`
- `FromStr`
- `Display`
- `FromIterator<FontFeature>`
- [`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/).
