sfontmaker |
|
|
sfontmaker is a small utility that takes bitmapped font image files and annotates them with character breaks suitable for use with the SFont library. sfonmaker is a modified version of Diego Billi's BFontMaker. The primary change is the output of PNG files instead of BMP files which allows for fonts with alpha transparency. Using sfontmakerFirst you need a source font image file. Basically, you need an image file (ideally a PNG file with a transparent background) that has the following characters in it in the given order: ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ One easy way to do this is to use the logo generation functions of the Gimp.
Once you have a source image, simply run sfontmaker like this: sfontmaker <infile> <outfile.png> where <infile> is your source image file and <outfile.png> is the PNG file to output. You somtimes need to touch up the output. Sometimes letters get too close together and the separation between them gets missed by the program. Load the image into your favorite image editor. Note the pink lines at the top. If you see two letters without any pink between them, place a pink dot (make sure to use the same color) at the point of the separation between them. A Gimp font creation scriptI wrote a little script for the gimp that allows for easy generation of nice-looking, outlined, gradient-shaded fonts in whatever color, font, and size you want. Here are some examples of the output:
To use it, grab the script here and place it in your local gimp script directory ("~/.gimp-1.2/scripts" for version 1.2 of gimp) Roger Feese has given me a version of the script updated to work with Gimp 2.2. Grab it here. In the main menu of the Gimp, select "Xtns/Script-Fu/SFont/Creat Sfont", select the size, font, and colors of your choice, and click "go". Save the resulting image as a PNG file, and then you can run it through sfontmaker to create a font for use with the SFont library. |