/usr/share/doc/xgridfit/html/trans-to-1.html is in xgridfit-doc 2.3-2.
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 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | <!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>
</div>
<div id="content">
<h1>Updating Xgridfit programs</h1>
<p>
With the introduction of Xgridfit 1.0, a number of elements and
attributes were deprecated. Most continued to work, while a few
had to be removed from programs. A utility, <tt>xgfupdate</tt>,
was introduced, which automatically updated Xgridfit program files
to use the newer, recommended syntax. A special schema,
<tt>xgridfit-transitional.rnc</tt>, could be used to validate
programs that retained deprecated but allowable features. More
features were deprecated with the release of version 1.10, and
<tt>xgfupdate</tt> was updated to substitute approved features for
deprecated ones.
</p>
<p>
With the release of version 1.11, support for all deprecated
features was removed from the Xgridfit compiler, and the
transitional schema and the DTD based on it were both removed from
the Xgridfit package. Therefore it is essential to
run <tt>xgfupdate</tt> on older program files to bring them up to
date.
</p>
<p>
By default, <tt>xgfupdate</tt> only does what is needed to update
from version 2.0 to version 2.1: that is, it adds namespace
declarations where needed (on <xgridfit> and in references
in <xi:include> elements). Invoke it as follows:
</p>
<pre>
xgfupdate oldfile.xgf > newfile.xgf</pre>
<p>
If you have older program files that need to be updated for
compatibility with Xgridfit 1.19, invoke <tt>xgfupdate</tt> as
follows:
</p>
<pre>
xgfupdate -v 1 oldfile.xgf > newfile.xgf</pre>
<p>
Then run the program without the <tt>-v 1</tt> attribute, if
necessary.
</p>
<p>
These commands will convert a batch of Xgridfit files:
</p>
<pre>
mkdir new
for f in *.xgf; do xgfupdate $f > new/$f; done</pre>
<p>
If you have <a
href="http://xmlstar.sourceforge.net/">XMLStarlet</a> installed on
your system, <tt>xgfupdate</tt> will format the new file
attractively; otherwise it will leave you with a valid file which
is messy in some places.
</p>
<p>
The following sections outline the changes to the language since
version 1.0.
</p>
<h2>Namespace declaration needed (2.1)</h2>
<p>
The <xgridfit> element requires the namespace declaration
<tt>xmlns="http://xgridfit.sourceforge.net/Xgridfit2"</tt>. This
change also requires revision of most <xi:include> elements:
for details, see the <a href="xinclude.html">XInclude</a> section
of this documentation.
</p>
<h2>Attributes <tt>count</tt> and <tt>highest</tt> replaced on <legacy-functions> (1.19)</h2>
<p>
There is now a single attribute, <tt>max-function-defs</tt>; this
should be the same as the corresponding maxp entry in any font
being converted for use with Xgridfit.
</p>
<h2>When generating Python script, use <tt>pyflags</tt> attribute on
<outfile> (1.19)</h2>
<p>
When you wanted a script generated by an earlier version of
Xgridfit to generate a font (rather than save an .sfd file), you
could include an <tt>fmflags</tt> attribute on the <outfile>
element: this was an integer to pass to FontForge's Generate()
command.
</p>
<p>
With version 1.19, you should still use <tt>fmflags</tt> when
generating a script in FontForge's native scripting language. But
if you are generating a Python script, you should instead use
<tt>pyflags</tt>, a list of values documented <a
href="reference.html#outfile">here</a>. Actually, it is perfectly
all right to have both attributes on the <outfile> element.
</p>
<h2>The <tt>offset</tt> attribute on <point> and <with-param> is not permitted (1.11)</h2>
<p>
The <tt>offset</tt> attribute has long been discouraged; use an
expression instead, e.g.
</p>
<pre>
<point num="p + 1"/></pre>
<p>
With version 1.11, the <tt>offset</tt> attribute is no longer
permitted.
</p>
<h2>Use <push> instead of <to-stack> (1.11)</h2>
<p>
In versions before 1.11, <push> could be used only to place
on the stack values that could be resolved to numbers at compile
time. It can now be used with values that must be resolved at run
time, and thus <to-stack> is no longer
necessary.
</p>
<h2>Use -p (push-break) option instead of -b (delta-break) (1.11)</h2>
<p>
These options are meant to prevent Xgridfit from producing a
command string so long that FontForge cannot process it. Xgridfit
breaks up long PUSH instructions into shorter ones; these options
determine how long those instructions can get before they must be
broken. In versions before 1.11, the -b (delta-break) option
applied only to deltas; in 1.11 and later both -b and -p
(push-break) affect all lists of numbers to be pushed onto the
stack. When -p is omitted but -b is present, -p is set to double
the amount of -b (because deltas involve two numbers). When -p is
present, -b, if present, is ignored. There is no plan to remove
the -b option, but -p should be preferred.
</p>
<h2><tt>value</tt> attribute on <param> element behaves differently for functions (1.11)</h2>
<p>
In versions before 1.11, the <tt>value</tt> attribute on
<param> was evaluated with <function> as context,
making the function's other <param> and <variable>
elements visible. This behavior made no sense, as <tt>value</tt>
was evaluated before execution of the function began. Now the
active context when evaluating <tt>value</tt> is the
<call-function> element. This means that name collisions
with the <constant> and other elements of a <glyph>
program are possible. However, access to such elements may at
times be useful.
</p>
<h2>Use <tt>name</tt> attribute to name things (1.0)</h2>
<p>
Earlier versions of Xgridfit inconsistently used <tt>name</tt> and
<tt>id</tt> attributes to name things. To refer to named elements,
it used <tt>function-id</tt> in function calls, <tt>macro-id</tt>
in macro calls, and <tt>param-id</tt> in passing parameters to
functions and macros. In versions 1.0 and later you should use
<tt>name</tt> everywhere, including these elements which formerly
used other attributes:
</p>
<pre>
<function name="my-func">
<macro name="my-macro">
<control-value name="my-cv" value="235"/>
<variable name="my-var"/>
<call-function name="my-func">
<with-param name="my-function-param"/>
</call-function>
<call-macro name="my=macro">
<with-param name="my-macro-param"/>
</call-macro></pre>
<h2><default type="max-instructions"> is not permitted (1.0)</h2>
<p>
This <default> type is used only by pre-1.0 versions of
Xgridfit running in TTX mode. Since this mode is no longer
supported, the <default> type has no function.
</p>
<h2><asm> no longer permitted (1.0)</h2>
<p>
The <asm> element was used only in TTX mode, which is no
longer supported. Therefore <asm> elements must be converted
to <command> elements. To do this locate the sed script
<tt>convert-asm.sed</tt> (Linux users will find it either in
/usr/share/xml/xgridfit/utils/ or /usr/local/share/xml/xgridfit/utils/)
and run it as follows:
</p>
<pre>
sed -f /usr/local/share/xml/xgridfit/utils/convert-asm.sed oldfile.xgf > newfile.xgf</pre>
<p>
The result will be an Xgridfit file that is valid for FontForge
mode. This conversion is also done automatically by
<tt>xgfupdate</tt>.
</p>
<h2>Use <tt>value</tt> instead of <tt>num</tt> attribute with <constant> (1.0)</h2>
<p>
For consistency with <control-value> and <param>, the
<tt>num</tt> attribute on the <constant> element has been
changed to <tt>value</tt>.
</p>
<h2>Container elements are not needed (1.0)</h2>
<p>
Older versions of Xgridfit required the use of certain elements
whose only function was to contain other elements:
<profile>, <control-values>, <functions>,
<macros>, <declarations>, <variables>,
<params>. These elements are no longer used. The elements
they originally contained which are children of the
<xgridfit> element can come in any order (in pre-1.0
versions Xgridfit was rather fussy about the order of these
elements).
</p>
<h2><param-set> not always needed (1.0)</h2>
<p>
<call-function> and <call-macro> elements formerly
could contain only <param-set> elements, which could contain
<with-param> elements. But <param-set> is a device for
grouping parameters when a function is to be called repeatedly via
LOOPCALL, or when macro code is to be inserted repeatedly. It is
unnecessary when a function or macro is to be called just
once. Starting with version 1.0, <param-set> is needed only
when a single <call-function> or <call-macro> contains
more than one set of parameters; otherwise <with-param>
elements can be the children of <call-function> or
<call-macro>.
</p>
<h2>Use <tt>min-distance</tt> instead of <tt>min-amount</tt> (1.0)</h2>
<p>
Before version 1.10, a <tt>min-amount</tt> attribute on
<diagonal-stem> indicated that minimum distance should be
used with a specified value. This was inconsistent with the usage
of the <move> element. Beginning with version 1.0, and
obligatorily with version 1.11, <tt>min-amount</tt> is not
recognized; instead, specify a new minimum distance value with the
<tt>min-distance</tt> attribute, which can take a number, or yes,
or no.
</p>
</div>
</body>
</html>
|