Main Page   Class Hierarchy   Compound List   File List   Compound Members  

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 Methods

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. More...


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 Mon Sep 15 12:01:11 2003 for Kyra by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001