# TextOptions

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

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

```rust
struct TextOptions
```

Provides options for controlling text rendering and hinting.

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

## Members

- [`text_rendering_mode`](#struct_field-text_rendering_mode)
- [`text_hinting_mode`](#struct_field-text_hinting_mode)
- [`baseline_pixel_alignment`](#struct_field-baseline_pixel_alignment)
- [`merge_with`](#function-merge_with)
- [`get_text_options`](#function-get_text_options)
- [`set_text_options`](#function-set_text_options)
- [`get_text_rendering_mode`](#function-get_text_rendering_mode)
- [`set_text_rendering_mode`](#function-set_text_rendering_mode)
- [`get_text_hinting_mode`](#function-get_text_hinting_mode)
- [`set_text_hinting_mode`](#function-set_text_hinting_mode)
- [`get_baseline_pixel_alignment`](#function-get_baseline_pixel_alignment)
- [`set_baseline_pixel_alignment`](#function-set_baseline_pixel_alignment)

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

### text_rendering_mode

```rust
text_rendering_mode: crate::media::TextRenderingMode
```

Gets the text rendering mode.

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

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

### text_hinting_mode

```rust
text_hinting_mode: crate::media::TextHintingMode
```

Gets the text hinting mode.

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

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

### baseline_pixel_alignment

```rust
baseline_pixel_alignment: crate::media::BaselinePixelAlignment
```

Gets a value indicating whether the text baseline should be aligned to
the pixel grid.

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

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

### merge_with

```rust
fn merge_with(self: &Self, other: TextOptions) -> TextOptions
```

Merges this instance with `other`: every unspecified value of `self`
is taken from `other`.

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

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

### get_text_options

```rust
fn get_text_options(visual: &Visual) -> TextOptions
```

Gets the text options of a visual.

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

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

### set_text_options

```rust
fn set_text_options(visual: &Visual, value: TextOptions)
```

Sets the text options of a visual.

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

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

### get_text_rendering_mode

```rust
fn get_text_rendering_mode(visual: &Visual) -> TextRenderingMode
```

Gets the value of the `TextRenderingMode` text option for a visual.

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

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

### set_text_rendering_mode

```rust
fn set_text_rendering_mode(visual: &Visual, value: TextRenderingMode)
```

Sets the value of the `TextRenderingMode` text option for a visual.

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

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

### get_text_hinting_mode

```rust
fn get_text_hinting_mode(visual: &Visual) -> TextHintingMode
```

Gets the value of the `TextHintingMode` text option for a visual.

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

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

### set_text_hinting_mode

```rust
fn set_text_hinting_mode(visual: &Visual, value: TextHintingMode)
```

Sets the value of the `TextHintingMode` text option for a visual.

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

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

### get_baseline_pixel_alignment

```rust
fn get_baseline_pixel_alignment(visual: &Visual) -> BaselinePixelAlignment
```

Gets the value of the `BaselinePixelAlignment` text option for a
visual.

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

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

### set_baseline_pixel_alignment

```rust
fn set_baseline_pixel_alignment(visual: &Visual, value: BaselinePixelAlignment)
```

Sets the value of the `BaselinePixelAlignment` text option for a
visual.

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

## 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`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `ServerPropertyValue`
- `BatchValue`

## Availability

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