KrFontResource Class Reference

A font is what text is created from. More...

#include <fontresource.h>

Inheritance diagram for KrFontResource:

KrSpriteResource KrResource List of all members.

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 KrFontResourceToFontResource ()
 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.

Detailed Description

A font is what text is created from.

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
Generated on Thu Jul 20 20:45:32 2006 for Kyra by  doxygen 1.4.7