#include <nnsys/g2d/g2d_Font.h>
int NNS_G2dFontGetTextHeight(
const NNSG2dFont* pFont,
int vSpace,
const NNSG2dChar* txt
);
pFont | [IN] Pointer to font |
vSpace | [IN] Line interval (in pixels) |
txt | [IN] Pointer to text string |
Returns the height of the text string when drawn (in pixels).
Calculates the height of text string txt when drawn.
For information on the other arguments, see NNS_G2dTextCanvasInit
.
Use this function when you want to know the size of the 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_G2dTextCanvasGetTextHeight
.
For a vertically written font, this function calculates the width of the text string.
2007/03/14 Added support for vertically written/vertically held fonts.
2005/05/25 Initial version.
CONFIDENTIAL