# TextShaperOptions

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

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

```rust
struct TextShaperOptions
```

Options to customize text shaping.

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

## Members

- [`new`](#function-new)
- [`with_all`](#function-with_all)
- [`glyph_typeface`](#function-glyph_typeface)
- [`font_rendering_em_size`](#function-font_rendering_em_size)
- [`bidi_level`](#function-bidi_level)
- [`culture`](#function-culture)
- [`incremental_tab_width`](#function-incremental_tab_width)
- [`letter_spacing`](#function-letter_spacing)
- [`font_features`](#function-font_features)
- [`produce_concat_flags`](#function-produce_concat_flags)
- [`with_concat_flags`](#function-with_concat_flags)

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

### new

```rust
fn new(typeface: Rc<GlyphTypeface>) -> Self
```

Creates options with the default em size, bidi level 0 and no culture,
tab width, letter spacing or features.

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

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

### with_all

```rust
fn with_all(typeface: Rc<GlyphTypeface>, font_rendering_em_size: f64, bidi_level: i8, culture: Option<Locale>, incremental_tab_width: f64, letter_spacing: f64, font_features: Option<Rc<Vec<FontFeature>>>) -> Self
```

Creates options with every value specified.

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

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

### glyph_typeface

```rust
fn glyph_typeface(self: &Self) -> &Rc<GlyphTypeface>
```

Get the typeface.

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

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

### font_rendering_em_size

```rust
fn font_rendering_em_size(self: &Self) -> f64
```

Get the font rendering em size.

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

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

### bidi_level

```rust
fn bidi_level(self: &Self) -> i8
```

Get the bidi level of the text.

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

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

### culture

```rust
fn culture(self: &Self) -> Option<&Locale>
```

Get the culture.

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

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

### incremental_tab_width

```rust
fn incremental_tab_width(self: &Self) -> f64
```

Get the incremental tab width.

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

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

### letter_spacing

```rust
fn letter_spacing(self: &Self) -> f64
```

Get the letter spacing.

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

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

### font_features

```rust
fn font_features(self: &Self) -> Option<&Rc<Vec<FontFeature>>>
```

Get features.

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

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

### produce_concat_flags

```rust
fn produce_concat_flags(self: &Self) -> bool
```

Whether the shaper records the concatenation flags of the glyphs it makes.

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

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

### with_concat_flags

```rust
fn with_concat_flags(self: Self, produce: bool) -> Self
```

These options, with the shaper recording the concatenation flags of the glyphs it makes or
not.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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`

## Availability

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