http://www.directfb.org
index.html
DirectFB Reference Manual
IDirectFBFont.html
IDirectFBFont
GetStringExtents
Get the logical and real extents of the specified UTF-8 string as if it were drawn with this font.
GetStringExtents (
IDirectFBFont.html
IDirectFBFont
*
thiz,
const char
*
text,
int
bytes,
types.html#DFBRectangle
DFBRectangle
*
ret_logical_rect,
types.html#DFBRectangle
DFBRectangle
*
ret_ink_rect
);
Bytes specifies the number of bytes to take from the string or -1 for the complete NULL-terminated string.
The logical rectangle describes the typographic extents and should be used to layout text. The ink rectangle describes the smallest rectangle containing all pixels that are touched when drawing the string. If you only need one of the rectangles, pass NULL for the other one.
The ink rectangle is guaranteed to be a valid rectangle with positive width and height, while the logical rectangle may have negative width indicating right-to-left layout.
The rectangle offsets are reported relative to the baseline and refer to the text being drawn using DSTF_LEFT.
