/usr/share/doc/xgridfit/html/structure.html is in xgridfit-doc 2.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>xgridfit</title>
<link rel="stylesheet" href="oeg.css" media="screen" type="text/css" />
<link rel="stylesheet" href="parchment.css" media="screen"
type="text/css" title="parchment" />
<link rel="alternate stylesheet" href="legible.css" media="screen"
type="text/css" title="legible" />
<style type="text/css" media="print"> @import "oeg.print.css"; </style>
<meta name="AUTHOR" content="Peter S. Baker" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<div id="jumplist">
<a href="http://sourceforge.net"><img src="" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a>
<a href="http://xgridfit.sourceforge.net/">Home Page</a>
<a href="http://sourceforge.net/projects/xgridfit">Project Page</a>
<a href="http://sourceforge.net/project/showfiles.php?group_id=159705">Download</a>
<a href="http://xgridfit.cvs.sourceforge.net/xgridfit/xgridfit/">CVS repository</a>
<hr/>
<a href="#glyph-select"><glyph-select></a>
<a href="#infile"><infile></a>
<a href="#outfile"><outfile></a>
<a href="#constant"><constant></a>
<a href="#variable"><variable></a>
<a href="#round-state"><round-state></a>
<a href="#default-el"><default></a>
<a href="#control-values"><control-value></a>
<a href="#alias"><alias></a>
<a href="#functions"><function></a>
<a href="#macros"><macro></a>
<a href="#pre-program"><pre-program></a>
<a href="#glyph"><glyph></a>
</div>
<div id="content">
<h1>Structure of an Xgridfit Program</h1>
<p>
An Xgridfit program supplies the control-value table, pre-program,
functions and glyph programs for the font. It also controls
several parameters relating to TrueType instructions, stored in
the font's maxp table. The contents of the file must be
well-formed XML, validated against the Xgridfit RELAX NG schema
(<tt>xgridfit.rnc</tt> or <tt>xgridfit.rng</tt>). Perhaps the
easiest way to validate your program is to include the <tt>-V</tt>
option on the Linux command line when you invoke Xgridfit:
</p>
<pre>
$ xgridfit -V myprog.xgf
</pre>
<p>
Another worthwhile tool is nxml-mode, an Emacs mode that validates
while you edit your program. To use nxml-mode, copy
<tt>xgridfit.rnc</tt> to the nxml-mode schema directory and add
this line to <tt>schemas.xml</tt> in the same directory:
</p>
<pre>
<documentElement localName="xgridfit" uri="xgridfit.rnc"/>
</pre>
<p>
The first line in any Xgridfit program file must be the XML
declaration:
</p>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
</pre>
<p>
Then comes the <xgridfit> element, the root element that
contains all other information in the file. The <xgridfit>
element must contain the Xgridfit namespace declaration:
</p>
<pre>
<xgridfit xmlns="http://xgridfit.sourceforge.net/Xgridfit2">
</pre>
<p>
The child elements of <xgridfit> can come in any order,
though it makes sense to group related elements (e.g. functions,
control values) together.
</p>
<p>
Following are the possible children of the <xgridfit>
element.
</p>
<h2 id="glyph-select"><glyph-select></h2>
<p>
Specifies a list of glyphs to compile, ignoring all others. The
glyph names in the list may be delimited by "+" or space--but only
one or the other. It is all right to keep this element in the file
when you don't need it: just empty it out. These are valid:
</p>
<pre>
<glyph-select>a macron amacron</glyph-select>
<glyph-select></glyph-select>
</pre>
<h2 id="infile"><infile></h2>
<p>
Specifies the name of the FontForge file or TrueType font to be
opened by the script generated by Xgridfit.
</p>
<h2 id="outfile"><outfile></h2>
<p>
Specifies the name of the file or font to be saved by the script
generated by Xgridfit.
</p>
<h2 id="outfile"><datafile></h2>
<p>
When running in <a href="merge-mode.html">merge-mode</a>, Xgridfit
needs to save information about the font. It can do so in the
font.persistent object of an .sfd file it is saving or in a
separate file. Use this element to specify the name of a separate
file.
</p>
<h2 id="constant"><constant></h2>
<p>
Unlike the <a href="reference.html#constant"><constant></a>
elements defined in a <glyph> program, <constant>s
here are visible in all <glyph> programs, in
<function>, <macro>, and <pre-program> elements.
</p>
<h2 id="variable"><variable></h2>
<p>
Like the global <constant>, the <a
href="variables.html#global"><variable></a> defined here is
visible everywhere. It may be initialized by the
<pre-program> so as to provide state information to all
glyph programs, or it may be used anywhere for temporary storage.
</p>
<h2 id="round-state"><round-state></h2>
<p>
These elements, permitted only here, define <a
href="round.html#custom">custom round states</a>, which can be
invoked anywhere.
</p>
<h2 id="default-el"><default></h2>
<p>
These elements define <a href="graphics.html#set-default">graphics
defaults</a> and other <a
href="graphics.html#other-defaults">defaults and settings</a>.
</p>
<h2 id="control-values"><control-value></h2>
<p>
A <control-value> element defines a <a
href="cvt.html">control value</a>, a specialized variable used
by various instructions to regulate distance on the grid. A
typical TrueType font has many <control-value> elements.
</p>
<h2 id="alias"><alias></h2>
<p>
An alternate name for a control-value, constant or variable.
</p>
<h2 id="functions"><function></h2>
<p>
A <function> element contains the definition of a <a
href="functions.html#functions">function</a>--a chunk of code that
can be invoked from anywhere and, like the functions (methods,
procedures) of other programming languages, can accept parameters
and return values.
</p>
<h2 id="macros"><macro></h2>
<p>
A <macro> element contains the definition of a <a
href="functions.html#macros">macro</a>--a chunk of code that is
compiled whenever the compiler encounters a <call-macro>
element.
</p>
<h2 id="pre-program"><pre-program></h2>
<p>
The <pre-program> contains programming that is run <a
href="reference.html#pre-program">whenever the font is about to be
rasterized at a new size</a>. Typical tasks for the
<pre-program> are to round and adjust control values and set
default values in the graphics state. The <pre-program>
element is required, though it may be empty.
</p>
<h2 id="glyph"><glyph></h2>
<p>
The file may contain any number of <glyph> elements. Each
contains <a href="reference.html#glyph">the programming for a
single glyph</a>.
</p>
</div>
</body>
</html>
|