# VerticalMetricsTable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/fonts/tables/metrics/struct-verticalmetricstable/

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

```rust
struct VerticalMetricsTable
```

The `vmtx` (vertical metrics) table. Metrics are read lazily from the
table data; lookups never allocate.

The lookups return `Err` when the table is shorter than the header counts
promise (the reference implementation throws there).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L14)

## Members

- [`TAG_NAME`](#assoc_const-tag_name)
- [`TAG`](#assoc_const-tag)
- [`load`](#function-load)
- [`try_get_metrics`](#function-try_get_metrics)
- [`try_get_advance`](#function-try_get_advance)
- [`try_get_advances`](#function-try_get_advances)
- [`try_get_metrics_batch`](#function-try_get_metrics_batch)

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

### TAG_NAME

```rust
const TAG_NAME: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L21)

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

### TAG

```rust
const TAG: OpenTypeTag
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L22)

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

### load

```rust
fn load(font: &dyn IFontMemory, number_of_v_metrics: u16, glyph_count: i32) -> Option<VerticalMetricsTable>
```

Loads the table; `None` when the font has no `vmtx` table.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L29)

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

### try_get_metrics

```rust
fn try_get_metrics(self: &Self, glyph_index: u16) -> Result<Option<VerticalGlyphMetric>, FontTableError>
```

The metrics of a glyph; `Ok(None)` when the glyph index is out of range.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L36)

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

### try_get_advance

```rust
fn try_get_advance(self: &Self, glyph_index: u16) -> Result<Option<u16>, FontTableError>
```

The advance of a glyph; `Ok(None)` when the glyph index is out of range.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L67)

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

### try_get_advances

```rust
fn try_get_advances(self: &Self, glyph_indices: &[u16], advances: &mut [u16]) -> Result<bool, FontTableError>
```

Reads the advances of a batch of glyphs.

`Ok(false)` when `advances` is shorter than `glyph_indices` or a glyph
index is out of range (the advances before it are already written).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L87)

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

### try_get_metrics_batch

```rust
fn try_get_metrics_batch(self: &Self, glyph_indices: &[u16], metrics: &mut [VerticalGlyphMetric]) -> Result<bool, FontTableError>
```

Reads the metrics of a batch of glyphs.

`Ok(false)` when `metrics` is shorter than `glyph_indices` or a glyph
index is out of range (the metrics before it are already written).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/metrics/vertical_metrics_table.rs#L128)

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

## Availability

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