# Sandbox.Graphics.MeasureText

## Overload 1

```csharp
static Rect MeasureText(in Rect position, string text, string fontFamily = Roboto, float fontSize = 20, float fontWeight = 450, TextFlag flags = 132)
```

Measure how big some text will be, without having to render it

### Parameters

- `in position` (`Rect`)
- `text` (`string`)
- `fontFamily` (`string`), default `Roboto`
- `fontSize` (`float`), default `20`
- `fontWeight` (`float`), default `450`
- `flags` (`TextFlag`), default `132`

### Returns

`Rect`

## Overload 2

```csharp
static Rect MeasureText(in Rect position, in Scope scope, TextFlag flags = 132)
```

Measure how big some text will be, without having to render it

### Parameters

- `in position` (`Rect`)
- `in scope` (`Scope`)
- `flags` (`TextFlag`), default `132`

### Returns

`Rect`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
