% $Id: intro.tex 4115 2015-07-28 12:21:40Z mskala $

\chapter{Introduction}

FontAnvil is a script language interpreter for manipulating fonts. 
FontAnvil is substantially compatible with the PfaEdit/FontForge native
scripting language, but FontAnvil is intended for non-interactive use; for
instance, invocation from the build systems of font packages like
Tsukurimashou.  To better serve font package build systems in general and
Tsukurimashou in particular, FontAnvil has no GUI and, to a reasonable
extent, avoids dependencies on external packages.

There was a program called PfaEdit for editing fonts in Postscript ASCII
format (\texttt{.pfa} files).  PfaEdit development continued for many years,
it changed its name to FontForge, and it became the \emph{de facto} standard
font editing program in the free software community.  FontForge is still
under active development to this day.  The main focus of FontForge is on
interactive editing by GUI users, and the proportion of its code and
development effort dedicated to such users is large and growing.

PfaEdit had a scripting language, which as far as I know never had an
official name.  I will call it ``PE script'' in the interests of neutrality;
the traditional filename extension for files in this language is
\texttt{.pe}.  Development of PE script continued into the FontForge era. 
Many free font packages use PE scripts executed by FontForge to process font
files non-interactively in the context of a build system.  I myself maintain
the Tsukurimashou Project (\url{http://tsukurimashou.osdn.jp/}),
which processes fonts using PE scripts on a massive scale (thousands of
script invocations per build).

Attempting to use a large and steadily-growing GUI program as a
non-interactive script language interpreter is not always convenient.  The
many external libraries needed to build FontForge implicitly become
dependencies of any font package that needs FontForge for its build system;
and it is not easy to get users to install them all correctly just to build
a font package.  It is also hard to predict whether a given version of
FontForge will actually work for a given script: with GUI enhancements, and
even social network features, as the strategic priorities for FontForge
development, it is frequently the case that the stable and correct execution
of scripts is not at the top of the priority list, and bugs in script
processing are fixed late if at all.

FontAnvil is intended to be a stable PE script interpreter for use by the
Tsukurimashou Project, to eliminate the dependence on a third-party package
whose strategic goals are not closely aligned to Tsukurimashou's.  FontForge
may well stop supporting PE script entirely in the future; if Tsukurimashou
is to survive, then Tsukurimashou cannot be dependent on FontForge.

Only \FFdiff a small amount of effort is likely to be made by the
maintainers of FontAnvil and FontForge to retain compatibility with each
other.  The PE script language is mature and unlikely to change in too many
drastic ways, so most scripts written for one interpreter should run
correctly on the other for a long time, but already (about one year after
the first release of FontAnvil) each interpreter has minor features not
supported by the other, and it is likely they will continue to diverge.  In
this manual, notes on known differences between FontAnvil and FontForge are
marked by an \textit{ff} symbol in the margin.

Of all the parts of a forge, an anvil is simple,
an anvil is trustworthy, and most of all, \emph{an anvil is stable}.

\vspace{1cm}

\noindent
Matthew Skala\\
mskala@ansuz.sooke.bc.ca\\
\url{http://ansuz.sooke.bc.ca/}

\clearpage

