- Inherits from:
- Object
- Conforms to:
- DFont
- Declared in:
- DSimpleFont.h
Object
|
+---DSimpleFont
Class Description
The DSimpleFont class implements a simple 8x8 bitmap font. It is used as a start
font. It only implements the characters space till ~, all others are translated
to a '?'.
- Last modified:
- 31-Oct-2007 (DSimpleFont.h)
- commonly used methods
- - (DSimpleFont *) init
- Initialise a simple bitmap font
- Returns:
- the object
- Copy related methods
- - shallowCopy
- Do a shallow copy of a simple bitmap font
- Returns:
- the object
- Deconstructor
- - free
- Free the font
- Returns:
- the object
- Font members
- - (const char *) familyName
- Get the family name of the font
- Returns:
- the family name (or NULL)
- - (int) glyphsInFont
- Get the number of characters in font
- Returns:
- the number of characters in the font (or -1)
- - (const char *) styleName
- Get the style name of the font
- Returns:
- the style name (or NULL)
- Font methods
- - (BOOL) charSize :(char) ch :(unsigned *) width :(unsigned *) height
- Get the size of a character for the current font and size
- Parameters:
- ch - the character
width - the width of the string
height - the height of the string
- Returns:
- success
- - (BOOL) glyph :(char) ch :(DFT_Glyph *) glyph
- Get the glyph info for blitting a character for the current font and size
- Parameters:
- ch - the character
glyph - the character bitmap and blit info
- Returns:
- success
- - (BOOL) size :(unsigned) width :(unsigned) height
- Set the font size based on the width and height of one character
- Parameters:
- width - the requested width
height - the requested height
- Returns:
- success
- - (BOOL) size :(const char *) cstr :(unsigned) width :(unsigned) height
- Set the font size based on a string and requested a size
- Parameters:
- cstr - the string
width - the requested width
height - the requested height
- Returns:
- success
- - (BOOL) stringSize :(const char *) cstr :(unsigned *) width :(unsigned *) height
- Get the size of a string for the current font size
- Parameters:
- cstr - the string
width - the width of the string
height - the height of the string
- Returns:
- success
generated 05-Nov-2007 by ObjcDoc 3.0.0