FontMaker is an open source Python application to generate character pictures with given font. A character list file lists characters to be generated. This application also provides color assignment feature and edging/shadowing effect on generated pictures.
- Download a binary distribution of FontMaker (e.g., FontMaker-0.24-bin.zip) from Downloads page.
- Uncompress the binary distribution.
- Install FontMaker.
- Edit the char.lst
- Edit the
demo.bat
- Run
demo.bat
.- This will generate filename.lst and character pictures.
- The character pictures are classified with specific directories
- fore directory contains undecorated/raw character pictures.
- outline directory contains those pictures with adding outline.
- shadow11 directory contains those pictures with light shadow.
- shadow21 directory contains those pictures with enhanced shadow.
- Run
clean.bat
to remove generated files.
# A sample character list file
!"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
`abcdefghijklmnopqrstuvwxyz{|}~
- The character list file lists characters to be generated.
- A line prefixing
#
denotes a comment line.
@echo off
set fontmaker=fontmaker.exe
set outfile=filename.lst
echo =^> Generate a filename list file (%outfile%).
%fontmaker% name -o%outfile% char.lst
set name=%outfile%
set chars=char.lst
set font=arial.ttf
set dir=fore
echo =^> Generate font picture of only foreground.
%fontmaker% fore -n%name% -d%dir% -cGreen -f%font% -s40 %chars%
set dir=outline
echo =^> Generate font pictures with 1-pixel outline.
%fontmaker% outline -n%name% -d%dir% -cRed -lGreen -f%font% -s40 %chars%
set dir=shadow11
echo =^> Generate font pictures with 1x1 shadow.
%fontmaker% shadow11 -n%name% -d%dir% -cRed -lGreen -f%font% -s40 %chars%
set dir=shadow21
echo =^> Generate font pictures with 2x1 shadow.
%fontmaker% shadow21 -n%name% -d%dir% -cRed -lGreen -f%font% -s40 %chars%
pause
usage: fontmaker.exe [-h] [-v] {name,fore,outline,shadow11,shadow21} ...
Generate charater pictures with outline/shadow.
positional arguments:
{name,fore,outline,shadow11,shadow21}
commands
name Generate a filename-list file according to a char-list
file.
fore Generate font pictures of only foreground.
outline Generate font pictures with 1-pixel outline.
shadow11 Generate font pictures with shadow of 1 pixel on
right, 1 pixel on bottom
shadow21 Generate font pictures with shadow of 2 pixel on
right, 1 pixel on bottom.
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
usage: fontmaker.exe name [-h] [-o <file>] char-list-file
positional arguments:
char-list-file The char list file.
optional arguments:
-h, --help show this help message and exit
-o <file>, --outfile <file>
assign a <file> to put the filename list. The default
<file> is "filename.lst".
usage: fontmaker.exe fore [-h] [-n <file>] [-d <directory>] [-f <file>]
[-s <number>] [-c <color>]
char-list-file
positional arguments:
char-list-file The char list file.
optional arguments:
-h, --help show this help message and exit
-n <file>, --name <file>
assign a <file> to get the filename list. The default
<file> is "filename.lst".
-d <directory>, --dir <directory>
assign the <directory> to store output files. The
default directory is "out".
-f <file>, --font <file>
assign a font filename. The default font is
"arial.ttf".
-s <number>, --size <number>
assign a font size. The default size is "40".
-c <color>, --fore <color>
assign the <color> of foreground. The default <color>
is "white".
-H, --fixed turn on the switch to use fixed height of the font.
usage: fontmaker.exe outline [-h] [-n <file>] [-d <directory>] [-f <file>]
[-s <number>] [-c <color>] [-l <color>] [-b <color>]
char-list-file
positional arguments:
char-list-file The char list file.
optional arguments:
-h, --help show this help message and exit
-n <file>, --name <file>
assign a <file> to get the filename list. The default
<file> is "filename.lst".
-d <directory>, --dir <directory>
assign the <directory> to store output files. The
default directory is "out".
-f <file>, --font <file>
assign a font filename. The default font is
"arial.ttf".
-s <number>, --size <number>
assign a font size. The default size is "40".
-c <color>, --fore <color>
assign the <color> of foreground. The default <color>
is "white".
-l <color>, --outline <color>
assign the <color> of outline/shadow. The default <color>
is "gray".
-b <color>, --back <color>
assign the <color> of background. The default <color>
is "black".
-H, --fixed turn on the switch to use fixed height of the font.
usage: fontmaker.exe shadow11 [-h] [-n <file>] [-d <directory>] [-f <file>]
[-s <number>] [-c <color>] [-l <color>]
[-b <color>]
char-list-file
positional arguments:
char-list-file The char list file.
optional arguments:
-h, --help show this help message and exit
-n <file>, --name <file>
assign a <file> to get the filename list. The default
<file> is "filename.lst".
-d <directory>, --dir <directory>
assign the <directory> to store output files. The
default directory is "out".
-f <file>, --font <file>
assign a font filename. The default font is
"arial.ttf".
-s <number>, --size <number>
assign a font size. The default size is "40".
-c <color>, --fore <color>
assign the <color> of foreground. The default <color>
is "white".
-l <color>, --outline <color>
assign the <color> of outline/shadow. The default
<color> is "gray".
-b <color>, --back <color>
assign the <color> of background. The default <color>
is "black".
-H, --fixed turn on the switch to use fixed height of the font.
usage: fontmaker.exe shadow21 [-h] [-n <file>] [-d <directory>] [-f <file>]
[-s <number>] [-c <color>] [-l <color>]
[-b <color>]
char-list-file
positional arguments:
char-list-file The char list file.
optional arguments:
-h, --help show this help message and exit
-n <file>, --name <file>
assign a <file> to get the filename list. The default
<file> is "filename.lst".
-d <directory>, --dir <directory>
assign the <directory> to store output files. The
default directory is "out".
-f <file>, --font <file>
assign a font filename. The default font is
"arial.ttf".
-s <number>, --size <number>
assign a font size. The default size is "40".
-c <color>, --fore <color>
assign the <color> of foreground. The default <color>
is "white".
-l <color>, --outline <color>
assign the <color> of outline/shadow. The default
<color> is "gray".
-b <color>, --back <color>
assign the <color> of background. The default <color>
is "black".
-H, --fixed turn on the switch to use fixed height of the font.