# TextMetrics

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

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

```rust
struct TextMetrics
```

A metric that holds information about text specific measurements.

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

## Members

- [`font_rendering_em_size`](#struct_field-font_rendering_em_size)
- [`baseline`](#struct_field-baseline)
- [`ascent`](#struct_field-ascent)
- [`descent`](#struct_field-descent)
- [`line_gap`](#struct_field-line_gap)
- [`cap_height`](#struct_field-cap_height)
- [`line_height`](#struct_field-line_height)
- [`underline_thickness`](#struct_field-underline_thickness)
- [`underline_position`](#struct_field-underline_position)
- [`strikethrough_thickness`](#struct_field-strikethrough_thickness)
- [`strikethrough_position`](#struct_field-strikethrough_position)
- [`new`](#function-new)

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

### font_rendering_em_size

```rust
font_rendering_em_size: f64
```

Em size of font used to format and display text.

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

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

### baseline

```rust
baseline: f64
```

Gets the recommended distance from the top of the text to the baseline.

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

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

### ascent

```rust
ascent: f64
```

Gets the recommended distance above the baseline.

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

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

### descent

```rust
descent: f64
```

Gets the recommended distance under the baseline.

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

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

### line_gap

```rust
line_gap: f64
```

Gets the recommended additional space between two lines of text.

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

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

### cap_height

```rust
cap_height: f64
```

The height of the capital letters above the baseline (positive; a FerroUI addition,
`FontMetrics::cap_height`).

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

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

### line_height

```rust
line_height: f64
```

Gets the recommended line height.

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

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

### underline_thickness

```rust
underline_thickness: f64
```

Gets a value that indicates the thickness of the underline.

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

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

### underline_position

```rust
underline_position: f64
```

Gets a value that indicates the distance of the underline from the baseline.

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

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

### strikethrough_thickness

```rust
strikethrough_thickness: f64
```

Gets a value that indicates the thickness of the strikethrough.

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

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

### strikethrough_position

```rust
strikethrough_position: f64
```

Gets a value that indicates the distance of the strikethrough from the baseline.

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

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

### new

```rust
fn new(glyph_typeface: &GlyphTypeface, font_rendering_em_size: f64) -> Self
```



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

## Trait implementations

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

## Availability

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