Reference Manual - 1.0.1
IDirectFBFont   GetStringWidth

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

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.
从字符串中指定要画的字节数,或者为-1的时候画完字符串从NULL到结束。

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.
返回的宽度也许与实际画文本的宽度是不同的,因为这个函数返回的是它的逻辑宽度被使用在布局这文本。返回的是一个负数的宽度表明是从右向左画。

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