/******************************************************************************* Bitmap Font Tools for Macromedia Flash By Chris Hill Version 0.5 *******************************************************************************/ Installation Requirements -------------------------------------------------------------------------------- JRE( Java Runtime Environment ) 1.4.1 or greater. Available free from www.java.com Macromedia Flash MX not for free from www.macromedia.com OS Specific notes: -------------------------------------------------------------------------------- For Windows and Linux installations you must make sure that your Java executable is within your PATH variable scope. Mac OS X comes with Java pre-installed. If you are running 10.3 everything's configured. If you are running 10.2 you must run Software Update to upgrade your Java to the newest version. Running the Bitmap Font Writer Program: -------------------------------------------------------------------------------- Unzip to the directory of your choice, from here on called 'installation'. Windows: -------------------------------------------------------------------------------- Change to the installation/bin directory and double click on "font-writer.cmd" Linux: -------------------------------------------------------------------------------- Navigate to the installation/bin directory and type: sh font-writer.sh Mac OS X: -------------------------------------------------------------------------------- Open up the Terminal application. Navigate to the installation/bin directory and type: sh bfont.sh What is it? -------------------------------------------------------------------------------- The Bitmap Font Tools is a small toolkit to create and manipulate text in Macromedia Flash. It simplifies the process of creating and manipulating lots of tiny font pieces and importing them into Flash. There are two parts to the Bitmap Font Tools, the Flash Bitmap Font Writer, and the Bitmap Font Engine. The Writer takes a properly formatted PNG or GIF image of a font and slices it up into individual letters. Then it wraps up all the letters into a .swf file which can then be used in conjunction with the writer. Why? -------------------------------------------------------------------------------- Well, first off, you might be porting something that uses bitmap fonts to flash, and this will make your life a lot easier. Also flash's font rendering can be very cpu intensive, and using bitmap fonts can reduce the processing needed. You can also use colors and shadows that cannot be done with regular vector fonts. How? -------------------------------------------------------------------------------- First you need a properly formatted font. There are samples showing you the existing format. The first pixel in the upper right corner determines the 'seperator' between characters. Whenever the program encounters that color pixel in the first row of pixels in the image, it will make a new letter. The second pixel in the upper right corner determines the transparency color of the image. Save the font file in PNG or GIF format and open it with the Writer(located in the /bin directory). Choose Convert... and you'll have a swf file. You can now link to this font file in flash using the Bitmap Font Engine and use it to draw type in many styles. Check out the installation/flash/bfe.fla flash file for detailed information on using the Bitmap Font Engine. License -------------------------------------------------------------------------------- This code uses the JGenerator by Dmitry Skavish and is copyright (c) 2000 Dmitry Skavish (skavish@usa.net). All rights reserved. Most other code is copyright (c) 2003 Chris Hill under the GPL License. The license is located in this folder as gpl.html You may distribute this code however you like, but please keep the licenses intact! If you find this useful, you may donate a couple bucks by going to http://www.ubergeek.tv and clicking on 'Donate'. :)