com.hermetica.magician.fonts
Class GLBitmapFont

java.lang.Object
  |
  +--com.hermetica.magician.fonts.GLBitmapFont
Direct Known Subclasses:
GL8x13BitmapFont, GL9x15BitmapFont, GLHelvetica10BitmapFont, GLHelvetica12BitmapFont, GLHelvetica18BitmapFont, GLTimesRoman10BitmapFont, GLTimesRoman24BitmapFont

public abstract class GLBitmapFont
extends java.lang.Object

This class should be subclassed to provide class-based portable fonts that can be used in Magician.

Version:
$Revision: 1.5 $
Author:
Alligator Descartes <descarte@arcana.co.uk>

Field Summary
static java.lang.String VERSION
          Version information
 
Constructor Summary
GLBitmapFont()
           
 
Method Summary
 void drawCharacter(byte charToDraw)
          Draws a character in the current font
 void drawCharacter(char charToDraw)
          Draws a character in the current font
 void drawCharacter(int charToDraw)
          Draws a character in the current font
 void drawString(byte[] stringToDraw)
          Draws the specified string in the current font
 void drawString(char[] stringToDraw)
          Draws the specified string in the current font
 void drawString(java.lang.String stringToDraw)
          Draws the specified string in the current font
 int getCharacterHeight(char character)
          Returns the height of the specified character
 int getCharacterWidth(char character)
          Returns the width of the specified character
 GLBitmapChar getCharData(char character)
          Returns the data for the given character in the font
 int getFirstChar()
          Returns the first character index in the font
 GLBitmapChar[] getFontData()
          Returns the font data for this font
 java.lang.String getName()
          Returns the name of the font
 int getNumChars()
          Returns the number of characters in the font
 void setFirstChar(int firstChar)
          Sets the first character in the font
 void setFontData(GLBitmapChar[] fontData)
          Sets the font data at the given index
 void setName(java.lang.String name)
          Sets the name of the font
 void setNumChars(int numChars)
          Sets the number of characters in the font
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
Version information
Constructor Detail

GLBitmapFont

public GLBitmapFont()
Method Detail

getName

public final java.lang.String getName()
Returns the name of the font

setName

public final void setName(java.lang.String name)
Sets the name of the font

getFontData

public final GLBitmapChar[] getFontData()
Returns the font data for this font

setFontData

public final void setFontData(GLBitmapChar[] fontData)
Sets the font data at the given index

getNumChars

public final int getNumChars()
Returns the number of characters in the font

setNumChars

public final void setNumChars(int numChars)
Sets the number of characters in the font

getFirstChar

public final int getFirstChar()
Returns the first character index in the font

setFirstChar

public final void setFirstChar(int firstChar)
Sets the first character in the font

getCharacterWidth

public final int getCharacterWidth(char character)
Returns the width of the specified character

getCharacterHeight

public final int getCharacterHeight(char character)
Returns the height of the specified character

drawCharacter

public final void drawCharacter(byte charToDraw)
Draws a character in the current font

Parameters:
charToDraw - The character in the font to draw

drawCharacter

public final void drawCharacter(int charToDraw)
Draws a character in the current font

Parameters:
charToDraw - The character in the font to draw

drawCharacter

public void drawCharacter(char charToDraw)
Draws a character in the current font

Parameters:
charToDraw - The character in the font to draw

drawString

public final void drawString(java.lang.String stringToDraw)
Draws the specified string in the current font

Parameters:
stringToDraw - The string to draw

drawString

public final void drawString(char[] stringToDraw)
Draws the specified string in the current font

Parameters:
stringToDraw - The string to draw

drawString

public final void drawString(byte[] stringToDraw)
Draws the specified string in the current font

Parameters:
stringToDraw - The string to draw

getCharData

public final GLBitmapChar getCharData(char character)
Returns the data for the given character in the font

Parameters:
character - The character to fetch the bitmap data for