# TryGetGlyphMetrics(uint, out GlyphMetrics)

> Tries to get the metrics of the glyph at the given glyph index.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.TextCore.Text](/engine/6000.7/script-reference/unityengine/textcore/text.md)
* **Assembly:** UnityEngine.TextCoreTextEngineModule

## TryGetGlyphMetrics(uint, GlyphMetrics)

```csharp
public bool TryGetGlyphMetrics(uint glyphIndex, out GlyphMetrics metrics)
```

### Parameters

**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): The index of the glyph in the font asset's source font.**** (\[GlyphMetrics]\(/engine/6000.7/script-reference/unityengine/textcore/glyphmetrics)): The metrics of the glyph, or default if the font has no glyph at that index.

### Returns

| Type                                                          | Description                                                                        |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the font has a glyph at the given index. Otherwise, returns false. |

### Remarks

Metrics are expressed in pixels at the font asset's [\_faceInfo](/engine/6000.7/script-reference/unityengine/textcore/text/fontasset/faceinfo.md) point size. To get values for another font size, multiply them by that size divided by [\_pointSize](/engine/6000.7/script-reference/unityengine/textcore/faceinfo/pointsize.md). Glyphs without a visual representation, such as spaces, have zero width and height but a valid horizontal advance. This query reads the font data directly and doesn't add the glyph to the atlas.
