# GlyphDescriptor

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

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

```rust
struct GlyphDescriptor
```

The header of a glyph in the `glyf` table plus access to its outline.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L10)

## Members

- [`new`](#function-new)
- [`number_of_contours`](#function-number_of_contours)
- [`conservative_bounds`](#function-conservative_bounds)
- [`is_simple_glyph`](#function-is_simple_glyph)
- [`simple_glyph`](#function-simple_glyph)
- [`composite_glyph`](#function-composite_glyph)

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

### new

```rust
fn new(data: ReadOnlyMemory<u8>) -> Result<Self, FontTableError>
```

Reads the 10 byte glyph header; `Err` when the data is shorter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L18)

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

### number_of_contours

```rust
fn number_of_contours(self: &Self) -> i16
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L39)

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

### conservative_bounds

```rust
fn conservative_bounds(self: &Self) -> Rect
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L43)

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

### is_simple_glyph

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L47)

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

### simple_glyph

```rust
fn simple_glyph(self: &Self) -> SimpleGlyph<'_>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L51)

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

### composite_glyph

```rust
fn composite_glyph(self: &Self) -> Result<CompositeGlyph<'_>, FontTableError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/fonts/tables/glyf/glyph_descriptor.rs#L55)

## 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/).
