---
name: "s3d_draw_string"
section: "3"
platform: "linux"
package: "s3d-doc"
version: "0.2.2.1-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/s3d_draw_string"
---

# s3d\_draw\_string(3)

draw a simple string

## NAME

s3d\_draw\_string - draw a simple string

## SYNOPSIS

```
#include <s3d.h>
```

**int s3d\_draw\_string(const char \****str***, float \****xlen***);**

## DESCRIPTION

Renders the string str with in Truetype format with the height 1, returns the length of the rendered string in \*xlen (or set len=NULL to disable this).

```
 char str="hello world!";
 float len;
 s3d_select_font("vera");
 s3d_draw_string(str, len);
 // not interested in the length? do that: s3d_draw_string(str, NULL);
```

## AUTHOR

**Simon Wunderlich**

Author of s3d
