#include <nnsys/g2d/g2d_Font.h>
int NNS_G2dFontGetStringWidth(
const NNSG2dFont* pFont,
int hSpace,
const NNSG2dChar* str,
const NNSG2dChar** pPos
);
| pFont | [IN] Pointer to font |
| hSpace | [IN] Character interval (in pixels) |
| str | [IN] Pointer to character string |
| pPos | [OUT] Pointer to the buffer that holds the pointer to the next line. (Can be NULL.) |
Returns the line width of a drawn character string. ( in pixels).
Calculates the width that one line of the character string has when drawn. The width is for the drawing of the string from str to '\n' (0x0A) or '\0'.
If pPos is a non-NULL value, when '\n' is included in text string str, a pointer to the next character after the first '\n' is stored in the buffer indicated by pPos. Otherwise, NULL is stored in the buffer.
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 str . When TextCanvas is already created, use NNS_G2dTextCanvasGetStringWidth.
Calculates the character height for a vertically written font.
2007/03/14 Added support for vertically written/held fonts.
2005/05/25 Initial version.
CONFIDENTIAL