- Adopted by:
- DSimpleFont, DTrueTypeFont
- Declared in:
- DFont.h
Protocol Description
The DFont protocol specifies methods that should be implemented by
classes that act as font.
- Last modified:
- 19-Jul-2008 (DFont.h)
Method Index
- 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 06-Sep-2008 by ObjcDoc 3.0.0