| Reference Manual - 1.4.13

IDirectFBFont | GetStringWidth

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

DFBResult GetStringWidth (
| IDirectFBFont |  | * | thiz,
| const char |  | * | text,
| int |  |  | bytes,
| int |  | * | ret_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.

| This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License