#include <fontresource.h>
Inheritance diagram for KrFontResource:

Public Member Functions | |
| virtual U32 | Type () |
| The type of the resource. ( ex, KYRATAG_SPRITE ). | |
| virtual const std::string & | TypeName () |
| The name of the type. ( ex, "Sprite" ). | |
| virtual KrFontResource * | ToFontResource () |
| Return a pointer if this is a font resource. | |
| int | FontHeight () |
| Return the height of this font. | |
| int | FontWidth1 (U16 glyphCode) |
| Return the width of a single glyph. | |
| int | FontWidth (const U16 *str) |
| Return the width of a string. | |
| int | FontWidthN (const U16 *str, int nChars) |
| Return the width of the string up to nChars characters. | |
| bool | GlyphInFont (U16 glyphCode) |
| Return true if the given glyphcode is in this font set. | |
A font resource is a child of the sprite resource, because a Font Resource is a multi-frame Sprite Resource with some additional capability. (On the other hand, a Font is not a Sprite.)
That said, the Sprite API is almost certainly confusing. When using KrFontResource, you should probably focus on the KrFontResource class rather than the parent KrSpriteResource.
| bool KrFontResource::GlyphInFont | ( | U16 | glyphCode | ) |
Return true if the given glyphcode is in this font set.
A space is not in the font, but it will have a width.
1.4.7