DirectFB Reference Manual
IDirectFBFont   GetStringWidth

Get the logical width of the specified UTF-8 string as if it were drawn with this font.

GetStringWidth (
  IDirectFBFont *thiz
  const char *text
  int bytes
  int *width
);

Bytes specifies the number of bytes to take from the string or -1 for the complete NULL-terminated string.

The returned width may be different than the actual drawn width of the text since this function returns the logical width that should be used to layout the text. A negative width indicates right-to-left rendering.

  (C) Copyright by convergence GmbH