# FormattedText

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

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

```rust
struct FormattedText
```

The FormattedText class is targeted at programmers needing to add some
simple text to a visual.

All character indices and counts are UTF-16 code units of the text.

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

## Members

- [`DEFAULT_REAL_TO_IDEAL`](#assoc_const-default_real_to_ideal)
- [`DEFAULT_IDEAL_TO_REAL`](#assoc_const-default_ideal_to_real)
- [`IDEAL_INFINITE_WIDTH`](#assoc_const-ideal_infinite_width)
- [`REAL_INFINITE_WIDTH`](#assoc_const-real_infinite_width)
- [`GREATEST_MULTIPLIER_OF_EM`](#assoc_const-greatest_multiplier_of_em)
- [`new`](#function-new)
- [`set_foreground_brush`](#function-set_foreground_brush)
- [`set_foreground_brush_range`](#function-set_foreground_brush_range)
- [`set_font_features`](#function-set_font_features)
- [`set_font_features_range`](#function-set_font_features_range)
- [`set_font_family_name`](#function-set_font_family_name)
- [`set_font_family_name_range`](#function-set_font_family_name_range)
- [`set_font_family`](#function-set_font_family)
- [`set_font_family_range`](#function-set_font_family_range)
- [`set_font_size`](#function-set_font_size)
- [`set_font_size_range`](#function-set_font_size_range)
- [`set_culture`](#function-set_culture)
- [`set_culture_range`](#function-set_culture_range)
- [`set_font_weight`](#function-set_font_weight)
- [`set_font_weight_range`](#function-set_font_weight_range)
- [`set_font_style`](#function-set_font_style)
- [`set_font_style_range`](#function-set_font_style_range)
- [`set_font_typeface`](#function-set_font_typeface)
- [`set_font_typeface_range`](#function-set_font_typeface_range)
- [`set_text_decorations`](#function-set_text_decorations)
- [`set_text_decorations_range`](#function-set_text_decorations_range)
- [`flow_direction`](#function-flow_direction)
- [`set_flow_direction`](#function-set_flow_direction)
- [`text_alignment`](#function-text_alignment)
- [`set_text_alignment`](#function-set_text_alignment)
- [`line_height`](#function-line_height)
- [`set_line_height`](#function-set_line_height)
- [`max_text_width`](#function-max_text_width)
- [`set_max_text_width`](#function-set_max_text_width)
- [`set_max_text_widths`](#function-set_max_text_widths)
- [`get_max_text_widths`](#function-get_max_text_widths)
- [`max_text_height`](#function-max_text_height)
- [`set_max_text_height`](#function-set_max_text_height)
- [`max_line_count`](#function-max_line_count)
- [`set_max_line_count`](#function-set_max_line_count)
- [`trimming`](#function-trimming)
- [`set_trimming`](#function-set_trimming)
- [`height`](#function-height)
- [`extent`](#function-extent)
- [`baseline`](#function-baseline)
- [`overhang_after`](#function-overhang_after)
- [`overhang_leading`](#function-overhang_leading)
- [`overhang_trailing`](#function-overhang_trailing)
- [`width`](#function-width)
- [`width_including_trailing_whitespace`](#function-width_including_trailing_whitespace)
- [`build_geometry`](#function-build_geometry)
- [`build_highlight_geometry`](#function-build_highlight_geometry)
- [`build_highlight_geometry_range`](#function-build_highlight_geometry_range)

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

### DEFAULT_REAL_TO_IDEAL

```rust
const DEFAULT_REAL_TO_IDEAL: f64
```



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

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

### DEFAULT_IDEAL_TO_REAL

```rust
const DEFAULT_IDEAL_TO_REAL: f64
```



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

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

### IDEAL_INFINITE_WIDTH

```rust
const IDEAL_INFINITE_WIDTH: i32
```



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

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

### REAL_INFINITE_WIDTH

```rust
const REAL_INFINITE_WIDTH: f64
```



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

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

### GREATEST_MULTIPLIER_OF_EM

```rust
const GREATEST_MULTIPLIER_OF_EM: f64
```



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

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

### new

```rust
fn new(text_to_format: &str, culture: Locale, flow_direction: FlowDirection, typeface: Typeface, em_size: f64, foreground: Option<Rc<dyn IBrush>>) -> Self
```

Construct a FormattedText object.

* `text_to_format` — string of text to be displayed.
* `culture` — culture of text.
* `flow_direction` — flow direction of text.
* `typeface` — type face used to display text.
* `em_size` — font em size in visual units (1/96 of an inch).
* `foreground` — foreground brush used to render text.

Panics when the em size is not a positive number or is too large.

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

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

### set_foreground_brush

```rust
fn set_foreground_brush(self: &Self, foreground_brush: Rc<dyn IBrush>)
```

Sets foreground brush used for drawing text.

* `foreground_brush` — foreground brush

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

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

### set_foreground_brush_range

```rust
fn set_foreground_brush_range(self: &Self, foreground_brush: Option<Rc<dyn IBrush>>, start_index: i32, count: i32)
```

Sets foreground brush used for drawing text.

* `foreground_brush` — foreground brush
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_features

```rust
fn set_font_features(self: &Self, font_features: Option<FontFeatureCollection>)
```

Sets or changes the font features for the text object.

* `font_features` — feature collection

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

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

### set_font_features_range

```rust
fn set_font_features_range(self: &Self, font_features: Option<FontFeatureCollection>, start_index: i32, count: i32)
```

Sets or changes the font features for the text object.

* `font_features` — feature collection
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_family_name

```rust
fn set_font_family_name(self: &Self, font_family: &str)
```

Sets or changes the font family for the text object.

* `font_family` — font family name

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

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

### set_font_family_name_range

```rust
fn set_font_family_name_range(self: &Self, font_family: &str, start_index: i32, count: i32)
```

Sets or changes the font family for the text object.

* `font_family` — font family name
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_family

```rust
fn set_font_family(self: &Self, font_family: FontFamily)
```

Sets or changes the font family for the text object.

* `font_family` — font family

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

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

### set_font_family_range

```rust
fn set_font_family_range(self: &Self, font_family: FontFamily, start_index: i32, count: i32)
```

Sets or changes the font family for the text object.

* `font_family` — font family
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_size

```rust
fn set_font_size(self: &Self, em_size: f64)
```

Sets or changes the font em size measured in device independent units.

* `em_size` — font em size

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

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

### set_font_size_range

```rust
fn set_font_size_range(self: &Self, em_size: f64, start_index: i32, count: i32)
```

Sets or changes the font em size measured in device independent units.

* `em_size` — font em size
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_culture

```rust
fn set_culture(self: &Self, culture: Locale)
```

Sets or changes the culture for the text object.

* `culture` — the new culture for the text object.

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

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

### set_culture_range

```rust
fn set_culture_range(self: &Self, culture: Locale, start_index: i32, count: i32)
```

Sets or changes the culture for the text object.

* `culture` — the new culture for the text object.
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_weight

```rust
fn set_font_weight(self: &Self, weight: FontWeight)
```

Sets or changes the font weight.

* `weight` — font weight

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

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

### set_font_weight_range

```rust
fn set_font_weight_range(self: &Self, weight: FontWeight, start_index: i32, count: i32)
```

Sets or changes the font weight.

* `weight` — font weight
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_style

```rust
fn set_font_style(self: &Self, style: FontStyle)
```

Sets or changes the font style.

* `style` — font style

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

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

### set_font_style_range

```rust
fn set_font_style_range(self: &Self, style: FontStyle, start_index: i32, count: i32)
```

Sets or changes the font style.

* `style` — font style
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_font_typeface

```rust
fn set_font_typeface(self: &Self, typeface: Typeface)
```

Sets or changes the type face.

* `typeface` — typeface

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

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

### set_font_typeface_range

```rust
fn set_font_typeface_range(self: &Self, typeface: Typeface, start_index: i32, count: i32)
```

Sets or changes the type face.

* `typeface` — typeface
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### set_text_decorations

```rust
fn set_text_decorations(self: &Self, text_decorations: TextDecorationCollection)
```

Sets or changes the text decorations.

* `text_decorations` — text decorations

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

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

### set_text_decorations_range

```rust
fn set_text_decorations_range(self: &Self, text_decorations: TextDecorationCollection, start_index: i32, count: i32)
```

Sets or changes the text decorations.

* `text_decorations` — text decorations
* `start_index` — the start index of initial character to apply the change to.
* `count` — the number of characters the change should be applied to.

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

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

### flow_direction

```rust
fn flow_direction(self: &Self) -> FlowDirection
```

Defines the flow direction.

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

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

### set_flow_direction

```rust
fn set_flow_direction(self: &Self, value: FlowDirection)
```

Defines the flow direction.

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

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

### text_alignment

```rust
fn text_alignment(self: &Self) -> TextAlignment
```

Defines the alignment of text within the column.

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

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

### set_text_alignment

```rust
fn set_text_alignment(self: &Self, value: TextAlignment)
```

Defines the alignment of text within the column.

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

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

### line_height

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

Gets the height of, or the spacing between, each line where zero
represents the default line height.

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

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

### set_line_height

```rust
fn set_line_height(self: &Self, value: f64)
```

Sets the height of, or the spacing between, each line where zero
represents the default line height.

Panics when the value is negative.

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

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

### max_text_width

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

The MaxTextWidth property defines the alignment edges for the FormattedText.
For example, left aligned text is wrapped such that the leftmost glyph alignment point
on each line falls exactly on the left edge of the rectangle.
Note that for many fonts, especially in italic style, some glyph strokes may extend beyond
the edges of the alignment rectangle. For this reason, it is recommended that clients draw
text with at least 1/6 em (i.e of the font size) unused margin space either side.
Zero value of MaxTextWidth is equivalent to the maximum possible paragraph width.

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

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

### set_max_text_width

```rust
fn set_max_text_width(self: &Self, value: f64)
```

Sets the maximum text width. Panics when the value is negative.

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

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

### set_max_text_widths

```rust
fn set_max_text_widths(self: &Self, max_text_widths: &[f64])
```

Sets the array of lengths, which will be applied to each line of text in turn.
If the text covers more lines than there are entries in the length array,
the last entry is reused as many times as required.
The max text widths array overrides the MaxTextWidth property.

Panics when the array is empty.

* `max_text_widths` — the max text width array

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

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

### get_max_text_widths

```rust
fn get_max_text_widths(self: &Self) -> Vec<f64>
```

Obtains a copy of the array of lengths, which will be applied to each line of text in turn.
If the text covers more lines than there are entries in the length array,
the last entry is reused as many times as required.
The max text widths array overrides the MaxTextWidth property.

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

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

### max_text_height

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

Gets the maximum length of a column of text.
The last line of text displayed is the last whole line that will fit within this limit,
or the nth line as specified by MaxLineCount, whichever occurs first.
Use the Trimming property to control how the omission of text is indicated.

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

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

### set_max_text_height

```rust
fn set_max_text_height(self: &Self, value: f64)
```

Sets the maximum length of a column of text. Panics when the value is
not greater than zero or is NaN.

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

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

### max_line_count

```rust
fn max_line_count(self: &Self) -> i32
```

Defines the maximum number of lines to display.
The last line of text displayed is the lineCount-1'th line,
or the last whole line that will fit within the count set by MaxTextHeight,
whichever occurs first.
Use the Trimming property to control how the omission of text is indicated.

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

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

### set_max_line_count

```rust
fn set_max_line_count(self: &Self, value: i32)
```

Sets the maximum number of lines to display. Panics when the value is
not greater than zero.

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

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

### trimming

```rust
fn trimming(self: &Self) -> Rc<dyn TextTrimming>
```

Defines how omission of text is indicated.
CharacterEllipsis trimming allows partial words to be displayed,
while WordEllipsis removes whole words to fit.
Both guarantee to include an ellipsis ('...') at the end of the lines
where text has been trimmed as a result of line and column limits.

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

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

### set_trimming

```rust
fn set_trimming(self: &Self, value: Rc<dyn TextTrimming>)
```

Defines how omission of text is indicated.

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

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

### height

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

The distance from the top of the first line to the bottom of the last line.

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

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

### extent

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

The distance from the topmost black pixel of the first line to the
bottommost black pixel of the last line.

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

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

### baseline

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

The distance from the top of the first line to the baseline of the first line.

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

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

### overhang_after

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

The distance from the bottom of the last line to the extent bottom.

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

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

### overhang_leading

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

The maximum distance from the leading black pixel to the leading alignment point of a line.

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

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

### overhang_trailing

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

The maximum distance from the trailing black pixel to the trailing alignment point of a line.

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

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

### width

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

The maximum advance width between the leading and trailing alignment points of a line,
excluding the width of whitespace characters at the end of the line.

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

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

### width_including_trailing_whitespace

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

The maximum advance width between the leading and trailing alignment points of a line,
including the width of whitespace characters at the end of the line.

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

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

### build_geometry

```rust
fn build_geometry(self: &Self, origin: Point) -> Option<Ref<Geometry>>
```

Obtains geometry for the text, including underlines and strikethroughs.

* `origin` — the left top origin of the resulting geometry.

Returns the geometry object containing the outline of the formatted text: the union
of all of the glyphs, underlines and strikethroughs that represent the formatted text.

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

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

### build_highlight_geometry

```rust
fn build_highlight_geometry(self: &Self, origin: Point) -> Option<Ref<Geometry>>
```

Builds a highlight geometry object.

* `origin` — the origin of the highlight region

Returns geometry that surrounds the text.

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

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

### build_highlight_geometry_range

```rust
fn build_highlight_geometry_range(self: &Self, origin: Point, start_index: i32, count: i32) -> Option<Ref<Geometry>>
```

Builds a highlight geometry object for a given character range.

* `origin` — the origin of the highlight region.
* `start_index` — the start index of initial character the bounds should be obtained for.
* `count` — the number of characters the bounds should be obtained for.

Returns geometry that surrounds the specified character range.

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

## 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`

## Availability

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