# GlyphRect

> A rectangle that defines the position of a glyph within an atlas texture.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.TextCore](/engine/6000.6/script-reference/unityengine/textcore.md)
* **Assembly:** UnityEngine.TextCoreFontEngineModule
* **Implements:** [IEquatable\<GlyphRect>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct GlyphRect : IEquatable<GlyphRect>
```

## Constructors

| Constructor                                                                                                                                                           | Description                      |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| [GlyphRect(System.Int32,System.Int32,System.Int32,System.Int32)](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/ctor.md#glyphrect\(int-int-int-int\)) | Constructor for a new GlyphRect. |
| [GlyphRect(UnityEngine.Rect)](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/ctor.md#glyphrect\(rect\))                                               | Constructor for a new GlyphRect. |

## Properties

| Property                                                                           | Description                                            |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------ |
| [height](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/height.md) | The height of the glyph.                               |
| [width](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/width.md)   | The width of the glyph.                                |
| [x](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/x.md)           | The x position of the glyph in the font atlas texture. |
| [y](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/y.md)           | The y position of the glyph in the font atlas texture. |

## Static Properties

| Property                                                                       | Description                                                                           |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
| [zero](/engine/6000.6/script-reference/unityengine/textcore/glyphrect/zero.md) | A GlyphRect with all values set to zero. Shorthand for writing GlyphRect(0, 0, 0, 0). |
