# Sandbox.Graphics.DrawText

## Overload 1

```csharp
static Rect DrawText(in Rect position, string text, Color color, string fontFamily = Roboto, float fontSize = 20, float fontWeight = 450, TextFlag flags = 132)
```

Draws a text quad in screenspace using the Material.UI.Text material.

### Parameters

- `in position` (`Rect`)
- `text` (`string`)
- `color` (`Color`)
- `fontFamily` (`string`), default `Roboto`
- `fontSize` (`float`), default `20`
- `fontWeight` (`float`), default `450`
- `flags` (`TextFlag`), default `132`

### Returns

`Rect`

## Overload 2

```csharp
static Rect DrawText(in Rect position, in Scope scope, TextFlag flags = 132)
```

Draws a text quad in screenspace using the Material.UI.Text material.

### Parameters

- `in position` (`Rect`)
- `in scope` (`Scope`)
- `flags` (`TextFlag`), default `132`

### Returns

`Rect`

## Overload 3

```csharp
static Rect DrawText(in Vector2 position, string text, Color color, string fontFamily = Roboto, float fontSize = 20, float fontWeight = 450)
```

Draws a text quad in screenspace using the Material.UI.Text material.

### Parameters

- `in position` (`Vector2`)
- `text` (`string`)
- `color` (`Color`)
- `fontFamily` (`string`), default `Roboto`
- `fontSize` (`float`), default `20`
- `fontWeight` (`float`), default `450`

### Returns

`Rect`

Declared in [Sandbox.Graphics](/api/Sandbox.Graphics).
Assembly: `Sandbox.Engine`.
