DOKK / manpages / debian 12 / s3d-doc / s3d_draw_string.3.en
S3D_DRAW_STRING(3) s3d Manual S3D_DRAW_STRING(3)

s3d_draw_string - draw a simple string

#include <s3d.h>

int s3d_draw_string(const char *str, float *xlen);

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);

Simon Wunderlich

Author of s3d
s3d