# PretextFontParser

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-pretext-contracts/struct-pretextfontparser/

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

```rust
struct PretextFontParser
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Pretext/FerroUI.Pretext.Contracts/pretext_font_descriptor.rs#L33)

## Members

- [`parse`](#function-parse)
- [`map_generic_family`](#function-map_generic_family)

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

### parse

```rust
fn parse(font: &str) -> PretextFontDescriptor
```

Parses the source's permissive CSS subset; absent pixel sizes use defaults.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Pretext/FerroUI.Pretext.Contracts/pretext_font_descriptor.rs#L37)

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

### map_generic_family

```rust
fn map_generic_family<'a>(primary_family: &'a str, sans_serif_fallback: &'a str, serif_fallback: &'a str, monospace_fallback: &'a str) -> &'a str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Pretext/FerroUI.Pretext.Contracts/pretext_font_descriptor.rs#L101)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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