# GlyphTypefaceCache

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

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

```rust
struct GlyphTypefaceCache
```

The glyph typefaces of a font collection by family name. Family names are
compared ignoring case.

The entries are kept sorted by name, so lookups neither allocate nor hash.

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

## Members

- [`try_get_value`](#function-try_get_value)
- [`contains_key`](#function-contains_key)
- [`count`](#function-count)
- [`keys`](#function-keys)

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

### try_get_value

```rust
fn try_get_value(self: &Self, family_name: &str) -> Option<Rc<RefCell<GlyphTypefaceMap>>>
```

The typefaces cached for the family.

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

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

### contains_key

```rust
fn contains_key(self: &Self, family_name: &str) -> bool
```

Whether typefaces are cached for the family.

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

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

### count

```rust
fn count(self: &Self) -> usize
```

The number of cached families.

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

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

### keys

```rust
fn keys(self: &Self) -> Vec<String>
```

The names of the cached families, sorted ignoring case.

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

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

## Availability

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