# TextParagraphProperties

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

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

```rust
trait TextParagraphProperties: 'static
```

Provides a set of properties that are used during the paragraph layout.

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

## Members

- [`flow_direction`](#function-flow_direction)
- [`text_alignment`](#function-text_alignment)
- [`line_height`](#function-line_height)
- [`line_spacing`](#function-line_spacing)
- [`text_line_bounds`](#function-text_line_bounds)
- [`line_metrics_mode`](#function-line_metrics_mode)
- [`first_line_in_paragraph`](#function-first_line_in_paragraph)
- [`always_collapsible`](#function-always_collapsible)
- [`default_text_run_properties`](#function-default_text_run_properties)
- [`text_decorations`](#function-text_decorations)
- [`text_wrapping`](#function-text_wrapping)
- [`indent`](#function-indent)
- [`paragraph_indent`](#function-paragraph_indent)
- [`default_incremental_tab`](#function-default_incremental_tab)
- [`tab_stops`](#function-tab_stops)
- [`tab_origin`](#function-tab_origin)
- [`letter_spacing`](#function-letter_spacing)

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

### flow_direction

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

This property specifies whether the primary text advance direction
shall be left-to-right, right-to-left.

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

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

### text_alignment

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

Gets the text alignment.

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

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

### line_height

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

Paragraph's line height.

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

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

### line_spacing

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

Paragraph's line spacing.

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

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

### text_line_bounds

```rust
fn text_line_bounds(self: &Self) -> TextLineBounds
```

How the box of each line is bounded above and below (a FerroUI addition,
docs/porting/DEVIATIONS.md, Text block): by the ascent and the descent of the font, or
trimmed to its cap height and to the baseline.

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

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

### line_metrics_mode

```rust
fn line_metrics_mode(self: &Self) -> TextLineMetricsMode
```

Chooses the font metrics used to allocate line boxes. Custom paragraph
implementations retain the existing glyph-typeface behavior by default.

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

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

### first_line_in_paragraph

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

Indicates the first line of the paragraph.

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

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

### always_collapsible

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

If true, the formatted line may always be collapsed. If false, only
lines that overflow the paragraph width are collapsed.

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

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

### default_text_run_properties

```rust
fn default_text_run_properties(self: &Self) -> &Rc<dyn TextRunProperties>
```

Gets the default text style.

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

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

### text_decorations

```rust
fn text_decorations(self: &Self) -> Option<&TextDecorationCollection>
```

If not null, text decorations to apply to all runs in the line. This
is in addition to any text decorations specified by the text run
properties for individual text runs.

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

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

### text_wrapping

```rust
fn text_wrapping(self: &Self) -> TextWrapping
```

Gets the text wrapping.

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

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

### indent

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

Line indentation.

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

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

### paragraph_indent

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

Get the paragraph indentation.

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

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

### default_incremental_tab

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

Gets the default incremental tab width.

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

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

### tab_stops

```rust
fn tab_stops(self: &Self) -> Option<&[TextTabStop]>
```

Explicit paragraph tab stops. `Some(&[])` enables position-based default
stops; `None` retains the existing fixed-width shaping convention for
callers that have not opted into paragraph tab layout.

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

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

### tab_origin

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

The current line's leading edge relative to the tab-stop origin, including
paragraph and first-line indentation. Units follow `default_incremental_tab`.

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

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

### letter_spacing

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

Gets the letter spacing.

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

## Trait implementations

- [`TextParagraphProperties`](/docs/0.5.0/api/ferroui-base/media/text_formatting/trait-textparagraphproperties/)

## Availability

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