# GenericTextRunProperties

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

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

```rust
struct GenericTextRunProperties
```

Generic implementation of `TextRunProperties`.

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

## Members

- [`DEFAULT_FONT_RENDERING_EM_SIZE`](#assoc_const-default_font_rendering_em_size)
- [`new`](#function-new)
- [`with_font_size`](#function-with_font_size)
- [`with_all`](#function-with_all)

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

### DEFAULT_FONT_RENDERING_EM_SIZE

```rust
const DEFAULT_FONT_RENDERING_EM_SIZE: f64
```



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

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

### new

```rust
fn new(typeface: Typeface) -> Self
```

Creates properties for a typeface with the default em size (12) and
nothing else set.

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

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

### with_font_size

```rust
fn with_font_size(typeface: Typeface, font_rendering_em_size: f64) -> Self
```

Creates properties for a typeface and em size.

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

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

### with_all

```rust
fn with_all(typeface: Typeface, font_rendering_em_size: f64, text_decorations: Option<TextDecorationCollection>, foreground_brush: Option<Rc<dyn IBrush>>, background_brush: Option<Rc<dyn IBrush>>, baseline_alignment: BaselineAlignment, culture_info: Option<Locale>, font_features: Option<FontFeatureCollection>) -> Self
```

Creates properties with every value specified.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`TextRunProperties`](/docs/0.5.0/api/ferroui-base/media/text_formatting/trait-textrunproperties/)

## Availability

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