Class FontStripImageGenerator

  extended by com.hdcookbook.grin.fontstrip.FontStripImageGenerator

public class FontStripImageGenerator
extends java.lang.Object

A driver class for generating FontDesignImage and FontImageMosaic. Steps are: 1) Parse the configuration xml file passed in from the user. 2) For each FontImageFile described in the xml, load the font and calculate where each character should be positioned in the FontDesignImage. 3) If any of the FontDesignImage(s) specified in the configuration file is not found in any of the asset directories, then physically generate missing FontDesignImage png files. If the FontDesignImages are found in the asset dir, then step (4) is done by scanning the existing files. 4) Generate the final image(s) unless the tool was invoked with -designOnly option. Read in the FontDesignImage png files, discard all the unnecessary pixel data, and pack them into FontImageMosaic that the xlet can load at runtime. While writing FontImageMosaic files, also generate associated information file, "fontstrp.inf". Since the character order and positioning of them in the FontDesignImage need to be known for creating final FontImageMosaics, this tool expects the idential config file to be passed in for both generating FontDesignImage(s) and generating FontImageMosaic(s) with possibly modified set of FontDesignImage(s).

Constructor Summary
FontStripImageGenerator(java.lang.String configFileName, double scaleX, double scaleY,[] assetDirs, java.lang.String outputDir)
Method Summary
 void generateImages(boolean designOnly)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FontStripImageGenerator(java.lang.String configFileName,
                               double scaleX,
                               double scaleY,
                     [] assetDirs,
                               java.lang.String outputDir)
Method Detail


public void generateImages(boolean designOnly)