#include <nnsys/g2d/g2d_Font.h>
int NNS_G2dFontGetTextWidth(
const NNSG2dFont* pFont,
int hSpace,
const NNSG2dChar* txt
);
| pFont | [IN] Pointer to font |
| hSpace | [IN] Character interval (in pixels) |
| txt | [IN] Pointer to character string |
Returns the width that the character string has when drawn ( in pixels).
Calculates the width that character string txt has when drawn. The value is the maximum of all line widths in txt.
For information on the other arguments, see NNS_G2dTextCanvasInit.
Use this function when you want to know the size of the character string before creating the TextCanvas. For example, use it when you are dynamically creating the smallest CharCanvas that can display all of txt. When TextCanvas is already created, use NNS_G2dTextCanvasGetTextWidth.
05/25/2005 Initial version.
CONFIDENTIAL