#include <nnsys/g2d/fmt/g2d_Font_data.h>
typedef struct NNSG2dCharWidths
{
s8 left;
u8 glyphWidth;
s8 charWidth;
}
NNSG2dCharWidths;
Stores the three pieces of width information possessed by each character. In NITRO Font, the three standard widths are the left space, the glyph width and the right space. However, instead of the right space width, which is seldom used, the font resource stores the character width, which is used often. If the value of the right space width is required, you can calculate it from the other values as shown below:
int GetRightSpaceWidth(const NNSG2dCharWidths* pWidths) { return pWidths->charWidth - (pWidths->left + pWidths->glyphWidth); }
left | Character's left (front) space width (in pixels). |
glyphWidth | The character's glyph width (in pixels). |
charWidth | The character's character width (=left space width + glyph width + right space width) (in pixels). |
2005/05/25 Initial version.
CONFIDENTIAL