> For the complete documentation index, see [llms.txt](https://docs.overdare.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.overdare.com/development/api-reference/classes/textservice.md).

# TextService

TextService : `Instance`

## Overview

TextService is a service that calculates the size that text occupies on the screen in advance.

Because the area a sentence occupies changes with the font and the size, it is used to obtain the required size before the UI is placed.

## Properties

## Methods

### GetTextBoundsAsync

A method that calculates the size of the area the text occupies under the specified conditions and returns it in pixels.

The measurement conditions are passed as a GetTextBoundsParams object.

#### Parameters

| `Value` InParams | The GetTextBoundsParams object containing the measurement conditions. |
| ---------------- | --------------------------------------------------------------------- |

#### Return

| `Value` | The width and height of the area occupied by the text. |
| ------- | ------------------------------------------------------ |

#### Code Samples

## Events

## See also

{% content-ref url="/pages/kSZpxoIAvTRuGEERWbE0" %}
[GetTextBoundsParams](/development/api-reference/classes/gettextboundsparams.md)
{% endcontent-ref %}
