Debian Codegraph @

doc/sphinx/olddocs/old/ja/scripting.html

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <!-- Created with AOLpress/2.0 -->
4 <!-- AP: Created on: 18-Jan-2002 -->
5 <!-- AP: Last modified: 14-Jul-2006 -->
6 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
7 <!--<TITLE>Writing scripts to change fonts in FontForge</TITLE>-->
8 <TITLE>FontForge でフォントを変更するためのスクリプトの書き方</TITLE>
9 <LINK REL="icon" href="../../_static/fftype16.png">
10 <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
11 </HEAD>
12 <BODY>
13 <DIV id="in">
14 <H1 ALIGN=Center>
15 <!--Writing scripts to change fonts in FontForge-->
16 FontForge でフォントを変更するためのスクリプトの書き方
17 </H1>
18 <P>
19 <!--
20 FontForge includes an interpreter so you can write scripts to modify fonts. -->
21 FontForge はインタプリタを内蔵しているので、フォントを変更するためのスクリプトを書くことができます。
22 <UL>
23 <LI>
24 <!-- <A HREF="scripting-tutorial.html">Scripting tutorial</A> -->
25 <A HREF="scripting-tutorial.html">スクリプト処理のチュートリアル</A>
26 <LI>
27 <!-- <A HREF="#Starting">Invoking a script</A> -->
28 <A HREF="#Starting">スクリプトの呼び出し方</A>
29 <LI>
30 <!-- <A HREF="#Language">Scripting language</A> -->
31 <A HREF="#Language">スクリプト言語</A>
32 <UL>
33 <LI>
34 <!-- <A HREF="#variables">Built in variables</A> -->
35 <A HREF="#variables">組込み変数</A>
36 <LI>
37 <!-- <A HREF="#procedures">Built in procedures</A> -->
38 <A HREF="#procedures">組込み手続き</A>
39 <LI>
40 <!-- <A HREF="#Example">Examples</A> -->
41 <A HREF="#Example">例</A>
42 </UL>
43 <LI>
44 <!-- <A HREF="scripting.html#Execute">The Execute Script dialog</A> -->
45 <A HREF="scripting.html#Execute">「スクリプトを実行」ダイアログ</A>
46 <LI>
47 <!-- <A HREF="#menu">The Scripts menu</A> -->
48 <A HREF="#menu">「スクリプト」メニュー</A>
49 </UL>
50 <H2>
51 <!-- <A NAME="Starting">Invoking scripts</A> -->
52 <A NAME="Starting">スクリプトの呼び出し方</A>
53 </H2>
54 <P>
55 <!--
56 If you start fontforge with a script on the command line it will not put
57 up any windows and it will exit when the script is done. -->
58 スクリプトを指定して FontForge をコマンドラインから起動したときはウィンドウは表示されず、スクリプトが終了した時にプログラムの終了となります。
59 <BLOCKQUOTE>
60 <PRE>$ fontforge -script scriptfile.pe {fontnames}
61 </PRE>
62 </BLOCKQUOTE>
63 <P>
64 <!--
65 FontForge can also be used as an interpreter that the shell will automatically
66 pass scripts to. If you a mark your script files as executable<BR>
67 <CODE>&nbsp; &nbsp; $ chmod +x scriptfile.pe</CODE><BR>
68 and begin each one with the line<BR>
69 <CODE>&nbsp; &nbsp; #!/usr/local/bin/fontforge</CODE><BR>
70 (or wherever fontforge happens to reside on your system) then you can invoke
71 the script just by typing<BR>
72 <CODE>&nbsp; &nbsp; $ scriptfile.pe {fontnames}</CODE> -->
73 FontForge は、シェルが自動的にスクリプトを渡すようなインタプリタとして使うこともできます。
74 スクリプトファイルが実行可能になるように<BR>
75 <CODE>&nbsp; &nbsp; $ chmod +x scriptfile.pe</CODE><BR>
76 として、それらのファイルの先頭の行に<BR>
77 <CODE>&nbsp; &nbsp; #!/usr/local/bin/fontforge</CODE><BR>
78 (または、システム上で FontForge が置かれているどこか別の場所) を書き加えることにより、<BR>
79 <CODE>&nbsp; &nbsp; $ scriptfile.pe {fontnames}</CODE><BR>
80 と打つだけでスクリプトを起動できるようになります。
81 <P>
82 <!--
83 If you wish FontForge to read a script from stdin then you can use "-" as
84 a "filename" for stdin. (If you build FontForge without X11 then fontforge
85 will attempt to read a script file from <CODE>stdin</CODE> if none is given
86 on the command line.) -->
87 FontForge に標準入力からスクリプトを読み込ませたい場合は、“-”を標準入力を表すファイル名として使用することができます。
88 (もし FontForge を X11 無しで作成した場合、コマンドラインに何も指定しなければ、FontForge はスクリプトを標準入力から読もうと試みます。)
89 <P>
90 <!--
91 You can also start a script from within FontForge with
92 <CODE>File-&gt;Execute Script</CODE>, and you can use the Preference Dlg
93 to define a set of frequently used scripts which can be invoked directly
94 by menu. -->
95 また、FontForge を使用中に、<CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトを実行(<U>X</U>)...</CODE> メニューを用いてスクリプトを起動することもできますし、頻繁に用いるスクリプトをプリファレンスダイアログで登録してメニューから直接起動可能なように設定することもできます。
96 <P>
97 <!--
98 The scripting language provides access to much of the functionality found
99 in the font view's menus. It does not currently (and probably never will)
100 provide access to everything. (If you find a lack let me know, I may put
101 it in for you). It does not provide commands for building up a glyph out
102 of splines, instead it allows you to do high level modifications to glyphs. -->
103 スクリプト言語により、フォント表示画面のメニューに見られる機能の多くを使用することができます。
104 現在のところ (将来もそうでしょうが) 全ての対象にアクセスできるわけではありません。
105 (もし何か欠けている機能があったら作者に知らせてください。それを追加しましょう)。
106 スクリプト言語は曲線からグリフを組み立てるコマンドを提供する物ではなく、グリフに対する高レベルな修正を可能にするための物です。
107 <P>
108 <!--
109 If you set the environment variable <CODE>PFAEDIT_VERBOSE</CODE> (it doesn't
110 need a value, just needs to be set) then FontForge will print scripts to
111 stdout as it executes them. -->
112 環境変数 <CODE>PFAEDIT_VERBOSE</CODE> が定義されている場合 (値を設定する必要はなく、定義するだけで十分です) FontForge は、スクリプトを実行するごとにその内容を標準出力に書き出します。
113 <P>
114 <P>
115 <!--
116 In general I envision this as being useful for things like taking a latin
117 font and extending it to contain cyrillic glyphs. So the script might: -->
118 一般的に言って、作者はこの機能を例えばラテン文字フォントを入力としてキリル文字のグリフを含むように拡張するような作業に役立つことを思い描いています。この場合、スクリプトはこのような物になるでしょう:
119 <UL>
120 <LI>
121 <!-- Reencode the font -->
122 フォントのコード変換を行う。
123 <LI>
124 <!-- Place a reference to Latin "A" at Cyrillic "A" -->
125 ラテン文字“A”への参照をキリル文字“А”に配置する
126 <LI>
127 <!-- Copy Latin "R" to Cyrillic "YA" -->
128 ラテン文字“R”をキリル文字“Я”にコピーする
129 <LI>
130 <!-- Flip "YA" horizontally -->
131 “Я”を水平方向に反転する
132 <LI>
133 <!-- Correct its direction -->
134 パスの向きを修正する
135 <LI>
136 <!-- ... and so forth -->
137 ……等々
138 </UL>
139 <H2>
140 <!-- Scripting <A NAME="Language">Language</A>-->
141 スクリプト<A NAME="Language">言語</A>
142 </H2>
143 <P>
144 <!--
145 The syntax is rather like a mixture of C and shell commands. Every file
146 corresponds to a procedure. As in a shell script arguments passed to the
147 file are identified as $1, $2, ... $n. $0 is the file name itself. $argc
148 gives the number of arguments. $argv[&lt;expr&gt;] provides array access
149 to the arguments. -->
150 スクリプトの構文は、C とシェルコマンドを混ぜ合わせた物にかなり似ています。
151 各ファイルは手続きに対応します。
152 シェルスクリプトと同様に、スクリプトファイルに渡された引数は
153 $1, $2, …, $n という識別子で用いることができます。
154 $0 はスクリプトそれ自身です。
155 $argc は引数の個数を表します。
156 $argv[&lt;式&gt;] の形で、コマンドの引数を配列としてアクセスすることができます。
157 <P>
158 <!--
159 Terms can be -->
160 項は以下のいずれかを取ることができます。
161 <UL>
162 <LI>
163 <!-- A variable name (like "$1" or "i" or "@fontvar" or "_global")<BR>
164 The scope of the variable depends on the initial character of its name. -->
165 変数名 (例えば“$1”や“i”や“@fontvar”や“_global”のような)<BR>
166 変数のスコープは、名前の 1 文字目によって決まります。
167 <UL>
168 <LI>
169 <!-- A '$' signifies that it is a built-in variable. The user cannot create any
170 new variables beginning with '$'. Some, but not all, of these may be assigned
171 to. -->
172 &lsquo;$&rsquo;は組込み変数を示します。ユーザは&lsquo;$&rsquo;で始まる変数を新しく作ることはできません。それらの一部 (全部ではありません) は、値を代入することができます。
173 <LI>
174 <!-- A '_' signifies that the variable is global, it is always available. You
175 can use these to store context across different script files (or to access
176 data within nested script files). -->
177 &lsquo;_&rsquo;はグローバル変数を示します。これは常に利用可能です。これらは、異なるスクリプトファイル間で (または、ネストしたスクリプトファイル内で) 共通のコンテキストを格納するのに用いることができます。
178 <LI>
179 <!-- A '@' signifies that the variable is associated with the font. Any two scripts
180 looking at the same font will have access to the same variables. -->
181 &lsquo;@&rsquo;は、変数がフォントに固有の物であることを示します。同じフォントを参照する 2 つのスクリプトは常に同じ変数にアクセスします。
182 <LI>
183 <!-- A variable which begins with a letter is a local variable. It is only meaningful
184 within the current script file. Nested script files may have different variables
185 with the same names. -->
186 英文字で始まる変数はローカル変数です。それらは現在のスクリプトファイルの中でしか意味を持ちません。ネストしたスクリプトファイルの中では同じ名前の異なる変数を使用することができます。
187 </UL>
188 <LI>
189 <!-- an integer expressed in decimal, hex or octal -->
190 10 進, 8 進または 16 進表記の整数
191 <LI>
192 <!-- a unicode code point (which has a prefix of "0u" or "0U" and is followed
193 by a string of hex digits. This is only used by the select command. -->
194 Unicode のコードポイント (プレフィクス“0u”または“0U”の後ろに 16 進数表をつないだもの)。これは Select() コマンドでのみ使うことができます。
195 <LI>
196 <!-- a real number (in "C" locale format - - "." as the decimal point character)-->
197 実数 (“C”ロケールの書式 — 小数点は“.”)
198 <LI>
199 <!-- A string which may be enclosed in either double or single quotes. String
200 tokens are limited to 256 bytes. "\n" can be used to represent a newline
201 character. (If you need longer strings use the concatenation operator). -->
202 二重引用符または一重引用符で囲まれた文字列。文字列トークンは 256 バイトまでに制限されています。改行文字を表すのに "\n" を使用することができます。(より長い文字列が必要な場合、連結演算子を使用してください)。
203 <LI>
204 <!-- a procedure to call or file to invoke. -->
205 手続きの呼び出しまたは実行するファイル
206 <LI>
207 <!-- an expression within parentheses -->
208 括弧に囲まれた式
209 <LI>
210 <!-- a series of expressions (separated by commas) within brackets, as <CODE>[1,
211 2, 3, 5, 8]</CODE>, used to create an array. -->
212 (カンマで区切られた) 式の列を角括弧に入れたもの。例えば、<CODE>[1, 2, 3, 5, 8]</CODE> のように。配列の作成に使用されます。
213 </UL>
214 <P>
215 <!-- There are three different comments supported: -->
216 以下の 3 種類のコメント形式がサポートされています:
217 <UL>
218 <LI>
219 <!-- Starting with a "#" character and proceeding to end of line -->
220 文字“#”から行末まで
221 <LI>
222 <!-- Starting with "//" and proceeding to end of line -->
223 “//”から行末まで
224 <LI>
225 <!-- Starting with "/*" and proceeding to "*/" -->
226 “/*”から“*/”まで
227 </UL>
228 <P>
229 <!--
230 <A NAME="Expressions">Expressions</A> are similar to those in C, a few operators
231 have been omitted, a few added from shell scripts. Operator precedence has
232 been simplified slightly. So operators (and their precedences) are: -->
233 <A NAME="Expressions">式</A>は C とほぼ同じですが、二、三の演算子は省かれ、二、三がシェルスクリプトから追加されています。演算子の優先順位はわずかに単純化されています。
234 その結果、演算子 (とそれらの優先順位) は以下のようになっています:
235 <UL>
236 <LI>
237 <!-- unary operators (+, -, !, ~, ++ (prefix and postfix), --(prefix and postfix),
238 () (procedure call), [] (array index), :h, :t, :r, :e<BR> -->
239 単項演算子 (+, -, !, ~, ++ (前置および後置), -- (前置および後置),
240 () (手続き呼び出し), [] (配列インデックス), :h, :t, :r, :e<BR>
241 <!-- Most of these are as expected in C, the last four are borrowed from shell
242 scripts and are applied to strings -->
243 これらの殆んどは、C と同じ意味です。最後の 4 個はシェルスクリプトから借りてきた物で、数式に以下のように適用されます。
244 <UL>
245 <LI>
246 <!-- :h gives the head (directory) of a pathspec -->
247 :h は、パス指定の先頭部分 (ディレクトリ) を返します。
248 <LI>
249 <!-- :t gives the tail (filename) of a pathspec -->
250 :t は、パス指定の末尾 (ファイル名) を返します。
251 <LI>
252 <!-- :r gives the pathspec without the extension (if any) -->
253 :r は、パス指定から拡張子 (があれば) を取り除いたものを返します。
254 <LI>
255 <!-- :e gives the extension -->
256 :e は、拡張子を返します。
257 </UL>
258 <LI>
259 <!-- *, /, % (binary multiplicative operators) -->
260 *, /, % (二項乗法演算子)
261 <LI>
262 <!-- +, - (binary arithmetic operators)<BR> -->
263 +, - (二項算術演算子)<BR>
264 <!-- If the first operand of + is a string then + will be treated as concatenation
265 rather than addition. If the second operand is a number it will be converted
266 to a string (decimal representation) and then concatenated. -->
267 + の最初の引数が文字列ならば、+ は加算ではなく文字列連結として働きます。2 番目の文字列が数なら文字列 (10 進表記) に変換されてから結合されます。
268 <LI>
269 <!-- ==, !=, &gt;, &lt;, &gt;=, &lt;= (comparison operators, may be applied to
270 either two integers or two strings) -->
271 ==, !=, &gt;, &lt;, &gt;=, &lt;= (比較演算子。2 個の整数または 2 個の文字列に適用できます)
272 <LI>
273 <!-- &amp;&amp;, &amp; (logical and, bitwise and. (logical and will do short circuit
274 evaluation)) -->
275 &amp;&amp;, &amp; (論理的 AND とビット毎の AND。(論理的 AND は、短絡評価を行います))
276 <LI>
277 <!-- ||, |, ^ (logical or, bitwise or, bitwise exclusive or (logical or will do
278 short circuit evaluation)) -->
279 ||, |, ^ (論理的 OR とビット毎の OR, 排他的論理 OR。(論理的 OR は、短絡評価を行います))
280 <LI>
281 <!-- =, +=, -=, *=, /=, %= (assignment operators as in C. The += will act as
282 concatenation if the first operand is a string.) -->
283 =, +=, -=, *=, /=, %= (C と同様の代入演算子。最初の引数が文字列である場合、+= は文字列を結合します)
284 </UL>
285 <P>
286 <!--
287 Note there is no comma operator, and no "?:" operator. The precedence of
288 "and" and "or" has been simplified, as has that of the assignment operators.
289 -->
290 カンマ演算子、"?:" 演算子が存在しないことに注意してください。
291 “AND”,“OR”と、代入演算子の優先順位は単純化されています。
292 <P>
293 <!--
294 Procedure calls may be applied either to a name token, or to a string. If
295 the name or string is recognized as one of FontForge's internal procedures
296 it will be executed, otherwise it will be assumed to be a filename containing
297 another fontforge script file, this file will be invoked (since filenames
298 can contain characters not legal in name tokens it is important to allow
299 general strings to specify filenames). If the procedure name does not contain
300 a directory then it is assumed to be in the same directory as the current
301 script file. At most 25 arguments can be passed to a procedure. -->
302 手続き呼び出しは名前トークンまたは文字列に対して適用することができます。
303 名前または文字列が FontForge の内部手続きのどれかと認識された場合、それが実行されます。それ以外の場合は実行するファイルの名前であると見なされ、そのファイルが呼び出されます (ファイル名には、トークンとして使用できない文字を含むことができるため、ファイル名を指定するために文字列一般を指定できるのは肝要です)。
304 手続き名がディレクトリを含まない場合、現在のスクリプトファイルと同じディレクトリにある物と見なされます。手続きに渡すことのできる引数は最大で 25 個です。
305 <P>
306 <!--
307 Arrays are passed by reference, strings and integers are passed by value. -->
308 配列は参照渡しされます。文字列と整数は値渡しされます。
309 <P>
310 <!--
311 Variables may be created by assigning a value to them (only with the "="),
312 so:<BR>
313 <CODE>&nbsp; &nbsp; i=3</CODE><BR>
314 could be used to define "i" as a variable. Variables are limited in scope
315 to the current file, they will not be inherited by called procedures. -->
316 変数は、値を代入することによって (“=”のみで) 作成することができます。
317 ですから<BR>
318 <CODE>&nbsp; &nbsp; i=3</CODE><BR>
319 によって、“i”の変数定義を行うことができます。変数のスコープは現在のファイルのみに限定されているので、呼び出された手続きには引き継がれません。
320 <P>
321 <!--
322 A statement may be -->
323 文は以下のいずれかをとることができます。
324 <UL>
325 <LI>
326 <!-- an expression-->
327 1 個の式
328 <LI>
329 <!-- <CODE>if ( expression )<BR>
330 &nbsp; &nbsp; statements<BR>
331 {elseif ( expression )<BR>
332 &nbsp; &nbsp; statements}<BR>
333 [else<BR>
334 &nbsp; &nbsp; statements]<BR>
335 endif</CODE>-->
336 <CODE>if ( 式 )<BR>
337 &nbsp; &nbsp; 文の並び<BR>
338 {elseif ( 式 )<BR>
339 &nbsp; &nbsp; 文の並び}<BR>
340 [else<BR>
341 &nbsp; &nbsp; 文の並び]<BR>
342 endif</CODE>
343 <LI>
344 <!-- <CODE>while ( expression )<BR>
345 &nbsp; &nbsp; statements<BR>
346 endloop</CODE>-->
347 <CODE>while ( 式 )<BR>
348 &nbsp; &nbsp; 文の並び<BR>
349 endloop</CODE>
350 <LI>
351 <!-- <CODE>foreach<BR>
352 &nbsp; &nbsp; statements<BR>
353 endloop</CODE>-->
354 <CODE>foreach<BR>
355 &nbsp; &nbsp; 文の並び<BR>
356 endloop</CODE>
357 <LI>
358 <!-- <CODE>return [ expression ]</CODE>-->
359 <CODE>return [ 式 ]</CODE>
360 <LI>
361 <CODE>shift</CODE>
362 </UL>
363 <P>
364 <!--
365 As with C, non-zero expressions are defined to be true.<BR>
366 A return statement may be followed by a return value (the expression) or
367 a procedure may return nothing (void).<BR>
368 The shift statement is stolen from shell scripts and shifts all arguments
369 down by one. (argument 0, the name of the script file, remains unchanged.<BR>
370 The foreach statement requires that there be a current font. It executes
371 the statements once for each glyph in the selection. Within the statements
372 only one glyph at a time will be selected. After execution the selection
373 will be restored to what it was initially. (Caveat: Don't reencode the font
374 within a foreach statement).<BR>
375 Statements are terminated either by a new line (you can break up long lines
376 with backslash newline) or a semicolon. -->
377 C と同様に、非ゼロとなる式は真であると定義されています。<BR>
378 return 文は、その後ろに返り値 (式) を指定するか、または手続きは何も値を返さずに return で終了することも可能です。<BR>
379 shift 文はシェルスクリプトから拝借した構文で、全ての引数を
380 1 個ずつシフトします。
381 (引数 0 のスクリプトファイル名は変更されません。)<BR>
382 foreach 文は、カレントフォントが存在する時のみ使用できます。
383 foreach 文は、選択したグリフ群に含まれる各グリフに対して 1 回ずつ実行されます。
384 文の内部では、一度に 1 個のグリフのみが選択されます。
385 実行が完了すると、最初に選択されていたグリフ群が元通りに戻されます。
386 (警告: foreach 文の内部でフォントのコード変換を行ってはいけません)。<BR>
387 文は改行 (改行の前にバックスラッシュを置くことによって、長い行を分割することができます) またはセミコロンで完結します。
388 <P>
389 <!--
390 Trivial example: -->
391 つまらない例:
392 <BLOCKQUOTE>
393 <!--<PRE>i=0; #semicolon is not needed here, but it's ok -->
394 <PRE>i=0; # このセミコロンは不要ですが、あっても構いません
395 while ( i&lt;3 )
396 if ( i==1 /* <!--pointless comment -->無意味なコメント */ )
397 Print( "Got to one" ) // <!--Another comment-->もう一つコメント
398 endif
399 ++i
400 endloop
401 </PRE>
402 </BLOCKQUOTE>
403 <P>
404 <!--
405 FontForge maintains the concept of a "current font"- - almost all commands
406 refer only to the current font (and require that there be a font). If you
407 start a script with File-&gt;Execute Script, the font you were editing will
408 be current, otherwise there will be no initial current font. The Open(),
409 New() and Close() commands all change the current font. FontForge also maintains
410 a list of all fonts that are currently open. This list is in no particular
411 order. The list starts with $firstfont. -->
412 FontForge には「カレントフォント」という概念があります——ほぼ全てのコマンドはカレントフォントのみを参照します (ですから、カレントフォントが定義されている必要があります)。
413 <CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトを実行(<U>X</U>)...</CODE> でスクリプトを起動した場合、現在編集中のフォントがカレントフォントとなり、そうでなければ初期状態ではカレントフォントは存在しません。
414 カレントフォントを変更するには Open() と New(), Close() の各コマンドを使います。
415 FontForge は、現在開かれたフォントのリストも保持しています。
416 このリストの並び順にはとくに意味はありません。
417 リスト内の最初のフォントは $firstfont です。
418 <P>
419 <!--
420 Similarly when working with cid keyed fonts, FontForge works in the "current
421 sub font", and most commands refer to this font. The CIDChangeSubFont() command
422 can alter that. -->
423 同様に、CID キー指定フォントを操作する時には、FontForge の操作対象は「現在のサブフォント」であり、ほとんどのコマンドはそのフォントを参照します。それを変更するのには CIDChageSubFont() を使うことができます。
424 <P>
425 <!--
426 All builtin <A NAME="variables">variables</A> begin with "$", you may not
427 create any variables that start with "$" yourself (though you may assign
428 to (some) already existing ones) -->
429 全ての組込み<A NAME="variables">変数</A> は“$”で始まるので、自分で新しく“$”で始まる変数を作ることはできません (既存の変数 (の一部) に値を代入することはできますが)。
430 <UL>
431 <LI>
432 <!-- <CODE>$0 </CODE>the current script filename -->
433 <CODE>$0 </CODE>現在実行中のスクリプトファイルの名前
434 <LI>
435 <!-- <CODE>$1 </CODE>the first argument to the script file -->
436 <CODE>$1 </CODE>スクリプトファイルに渡された最初の引数
437 <LI>
438 <!-- <CODE>$2 </CODE>the second argument to the script file -->
439 <CODE>$2 </CODE>スクリプトファイルに渡された 2 番目の引数
440 <LI>
441 ...
442 <LI>
443 <!-- <CODE>$argc</CODE> the number of arguments passed to the script file (this
444 will always be at least 1 as $0 is always present) -->
445 <CODE>$argc</CODE> スクリプトファイルに渡された引数の個数 ($0 は常に存在するので、
446 最小値は 1 となります)
447 <LI>
448 <!-- <CODE>$argv </CODE>allows you to access the array of all the arguments -->
449 <CODE>$argv </CODE>により、全ての引数を配列としてアクセスすることができます
450 <LI>
451 <!-- <CODE>$curfont </CODE>the name of the filename in which the current font
452 resides -->
453 <CODE>$curfont </CODE>カレントフォントが含まれているファイルの名前
454 <LI>
455 <!-- <CODE>$firstfont </CODE>the name of the filename of the font which is first
456 on the font list (Can be used by Open()), if there are no fonts loaded this
457 returns an empty string. This can be used to determine if any font at all
458 is loaded into fontforge. -->
459 <CODE>$firstfont </CODE>
460 フォントリスト (Open() により作成可能です) の最初に位置するフォントのファイル名。
461 フォントを読み込んでいなければ、この値は空文字列となります。
462 この値によって、FontForge がフォントを読み込み済みかどうかを判別できます。
463 <LI>
464 <!-- <CODE>$nextfont </CODE>the name of the filename of the font which follows
465 the current font on the list (or the empty string if the current font is
466 the last one on the list) -->
467 <CODE>$nextfont </CODE>リスト内でカレントフォントの次に位置するファイルの名前。
468 (カレントフォントがリストの最後である場合は、空文字列)
469 <LI>
470 <!-- <CODE>$fontchanged</CODE> returns 1 if the current font has changed, 0 if
471 it has not changed since it was read in (or saved). -->
472 <CODE>$fontchanged </CODE>カレントフォントが変更されていれば 1,
473 フォントを読み込んでから (または保存してから) 変更が無ければ 0。
474 <LI>
475 <!-- <CODE>$fontname</CODE> the name contained in the postscript FontName field-->
476 <CODE>$fontname </CODE>postscript の FontName フィールドに含まれる名前
477 <LI>
478 <!-- <CODE>$familyname </CODE>the name contained in the postscript FamilyName
479 field -->
480 <CODE>$familyname </CODE>postscript の FamilyName フィールドに含まれる名前
481 <LI>
482 <!-- <CODE>$fullname </CODE>the name contained in the postscript FullName field-->
483 <CODE>$fullname </CODE>postscript の FullName フィールドに含まれる名前
484 <LI>
485 <!-- <CODE>$fondname </CODE>if set this name indicates what FOND the current font
486 should be put in under Generate Mac Family.-->
487 <CODE>$fondname </CODE>これがセットされている場合、カレントフォントを <CODE>Macファミリーを出力(<U>F</U>)</CODE> で出力したときの FOND の名前
488 <LI>
489 <!-- <CODE>$weight </CODE>the name contained in the postscript Weight field-->
490 <CODE>$weight </CODE>postscript の Weight フィールドに含まれる名前
491 <LI>
492 <!-- <CODE>$copyright </CODE>the name contained in the postscript Notice field-->
493 <CODE>$copyright </CODE>postscript の Notice フィールドに含まれる名前
494 <LI>
495 <!-- <CODE>$filename </CODE>the name of the file containing the font.-->
496 <CODE>$filename </CODE>フォントが含まれるファイルの名前
497 <LI>
498 <!-- <CODE>$fontversion</CODE> the string containing the font's version-->
499 <CODE>$fontversion </CODE>フォントのバージョンを示す文字列
500 <LI>
501 <!-- <CODE>$cidfontname </CODE>returns the fontname of the top-level cid-keyed
502 font (or the empty string if there is none)<BR>
503 Can be used to detect if this is a cid keyed font. -->
504 <CODE>$cidfontname </CODE>はトップレベルの CID-Keyed フォントの名前
505 (存在しない場合は空文字列) を返します。<BR>
506 フォントが CID-Keyed フォントであるの判別に利用できます。
507 <LI>
508 <!-- <CODE>$cidfamilyname, $cidfullname, $cidweight, $cidcopyright </CODE>similar
509 to above -->
510 <CODE>$cidfamilyname, $cidfullname, $cidweight, $cidcopyright </CODE>上記の各項目と同様です。
511 <LI>
512 <!-- <CODE>$mmcount </CODE>returns 0 for non multiple master fonts, returns the
513 number of instances in a multiple master font. -->
514 <CODE>$mmcount </CODE>マルチプルマスターフォントに含まれるインスタンスの個数 (マルチプルマスターフォントでない場合は 0)
515 <LI>
516 <!-- <CODE>$italicangle </CODE>the value of the postscript italic angle field -->
517 <CODE>$italicangle </CODE>PostScript の italic angle フィールドの値
518 <LI>
519 <!-- <CODE>$curcid </CODE>returns the fontname of the current font-->
520 <CODE>$curcid </CODE>カレントフォントのフォント名を返します。
521 <LI>
522 <!-- <CODE>$firstcid </CODE>returns the fontname of the first font within this
523 cid font-->
524 <CODE>$firstcid </CODE>現在の CID フォントに含まれる最初のフォントの名前を返します。
525 <LI>
526 <!-- <CODE>$nextcid </CODE>returns the fontname of the next font within this cid
527 font (or the empty string if the current sub-font is the last)-->
528 <CODE>$nextcid </CODE>現在の CID フォントに含まれる次のフォントの名前 (現在のサブフォントが最後の 1 個である場合は空文字列) を返します
529 <LI>
530 <!-- <CODE>$macstyle </CODE>returns the value of the macstyle field (a set of
531 bits indicating whether the font is bold, italic, condensed, etc.)-->
532 <CODE>$macstyle </CODE>MacStyle フィールド (フォントがボールド・イタリック・コンデンスト等であるかどうかを示すビットの集まり) を返します。
533 <LI>
534 <!-- <CODE>$bitmaps </CODE>returns an array containing all bitmap pixelsizes generated
535 for this font. (If the font database contains greymaps then they will be
536 indicated in the array as
537 <CODE>(&lt;BitmapDepth&gt;&lt;&lt;16)|&lt;PixelSize&gt;</CODE>)-->
538 <CODE>$bitmaps </CODE>このフォントにおいて作成されたビットマップのピクセルサイズを全て含む配列を返します
539 (フォントデータベースにグレイマップが含まれる場合、その値は
540 <CODE>(&lt;BitmapDepth&gt;&lt;&lt;16)|&lt;PixelSize&gt;</CODE>
541 という配列で表されます)。
542 <LI>
543 <!-- <CODE>$order </CODE>returns an integer containing either 2 (for truetype
544 fonts) or 3 (for postscript fonts). This indicates whether the font uses
545 quadratic or cubic splines.
546 <CODE>$order</CODE> は 2 (TrueType フォントの場合) または 3 (PostScript フォントの場合) のどちらかの整数値を返します。これは、フォントが 2 次スプラインと 3 次スプラインのどちらを使用しているかを表します。
547 <LI>
548 <!-- <CODE>$em</CODE> returns the number of em-units used by the font. -->
549 <CODE>$em</CODE> はフォントが使用する em ユニットの大きさを返します。
550 <LI>
551 <!-- <CODE>$ascent </CODE>returns the ascent of the font -->
552 <CODE>$ascent</CODE> はフォントの高さを返します。
553 <LI>
554 <!-- <CODE>$descent </CODE>returns the descent of the font. -->
555 <CODE>$descent</CODE> はフォントの深さを返します。
556 <LI>
557 <!-- <CODE>$selection</CODE> returns an array containing one entry for each glyph
558 in the current font indicating whether that glyph is selected or not
559 (0=&gt;not, 1=&gt;selected) -->
560 <CODE>$selection</CODE> カレントフォントの各グリフが 1 項目に対応し、そのグリフが選択されているか否か (0=&gt;非選択, 1=&gt;選択)を示す配列を返します。
561 <LI>
562 <!-- <CODE>$panose</CODE> returns an array containing the 10 panose values for
563 the font. -->
564 <CODE>$panose</CODE> カレントフォントの 10 要素の panose 値を含む配列を返します。
565 <LI>
566 <!-- <CODE>$trace</CODE> if this is set to one then FontForge will trace each
567 procedure call. -->
568 <CODE>$trace</CODE> この値が (訳註: 非 0 に) セットされていると、FontForge
569 は、手続きを呼び出すごとにトレース表示を行います。
570 <LI>
571 <!-- <CODE>$version</CODE> returns a string containing the current version of
572 fontforge. This should look something like "20050817". -->
573 <CODE>$version</CODE> 現在実行中の FontForge のバージョンを含む文字列を返します。
574 この値は“20050817”のような書式です。
575 <LI>
576 <!-- <CODE>$</CODE>&lt;<A NAME="Preference">Preference</A> Item&gt; (for example
577 <CODE>$AutoHint</CODE>) allows you to examine the value of that preference
578 item (to set it use
579 <CODE><A HREF="scripting-alpha.html#SetPref">SetPref</A></CODE>) -->
580 <CODE>$</CODE>&lt;<A NAME="Preference">環境設定</A>項目&gt; (例えば
581 <CODE>$AutoHint</CODE>) により、その環境設定項目に対応する値を調べることができます (値の設定には
582 <CODE><A HREF="scripting-alpha.html#SetPref">SetPref</A></CODE> を使用してください)
583 </UL>
584 <P>
585 <!--
586 The following example will perform an action on all loaded fonts: -->
587 以下の例では、読み込み済みの全フォントに対して同じ操作を実行します。
588 <BLOCKQUOTE>
589 <PRE>file = $firstfont
590 while ( file != "" )
591 Open(file)
592 <!--/* Do Stuff */-->/* 操作を実行 */
593 file = $nextfont
594 endloop
595 </PRE>
596 </BLOCKQUOTE>
597 <P>
598 <!--
599 The built in <A NAME="procedures">procedures</A> are very similar to the
600 menu items with the same names. Often the description here is sketchy, look
601 at the menu item for more information. -->
602 組込み <A NAME="procedures">手続き</A> の動作は、同じ名前のメニュー項目とほとんど同じです。ここでの説明はしばしば概要しか示されていませんので、より詳しい情報は当該のメニュー項目を調べてください。
603 <UL>
604 <LI>
605 <!-- <A HREF="scripting-alpha.html">Built-in procedures in alphabetic order</A> -->
606 <A HREF="scripting-alpha.html">組込み手続きのアルファベット順一覧</A>
607 <LI>
608 <!-- <A HREF="#no-font">Built-in procedures that do not require a font</A> -->
609 <A HREF="#no-font">フォントを必要としない組込み手続き</A>
610 <LI>
611 <!-- <A HREF="#file-menu">File menu</A> -->
612 <A HREF="#file-menu"><CODE>ファイル(<U>F</U>)</CODE>メニュー</A>
613 <LI>
614 <!-- <A HREF="#files">File manipulation</A> -->
615 <A HREF="#files">ファイル操作</A>
616 <LI>
617 <!-- <A HREF="#edit-menu">Edit menu</A> -->
618 <A HREF="#edit-menu"><CODE>編集(<U>E</U>)</CODE>メニュー</A>
619 <LI>
620 <!-- <A HREF="#select-menu">Select menu</A> -->
621 <A HREF="#select-menu"><CODE>選択(<U>S</U>)</CODE>サブメニュー</A>
622 <LI>
623 <!-- <A HREF="#element-menu">Element menu</A> -->
624 <A HREF="#element-menu"><CODE>エレメント(<U>L</U>)</CODE>メニュー</A>
625 <LI>
626 <!-- <A HREF="#font-info">Font information</A> -->
627 <A HREF="#font-info">フォント情報</A>
628 <LI>
629 <!-- <A HREF="#glyph-info">Glyph information</A> -->
630 <A HREF="#glyph-info">グリフ情報</A>
631 <LI>
632 <!-- <A HREF="#ATT">Advanced Typography</A> -->
633 <A HREF="#ATT">高度組版機能</A>
634 <LI>
635 <!-- <A HREF="#encoding-menu">Encoding menu</A> -->
636 <A HREF="#encoding-menu"><CODE>エンコーディング(<U>N</U>)</CODE>メニュー</A>
637 <LI>
638 <!-- <A HREF="#hint-menu">Hint menu</A> -->
639 <A HREF="#hint-menu"><CODE>ヒント(<U>H</U>)</CODE>メニュー</A>
640 <LI>
641 <!-- <A HREF="#metrics-menu">Metrics menu</A> -->
642 <A HREF="#metrics-menu"><CODE>メトリック(<U>M</U>)</CODE>メニュー</A>
643 <LI>
644 <!-- <A HREF="#MM">Multiple master</A> -->
645 <A HREF="#MM">マルチプルマスター</A>
646 <LI>
647 <!-- <A HREF="#CID">CID keyed fonts</A> -->
648 <A HREF="#CID">CID キー指定フォント</A>
649 <LI>
650 <!-- <A HREF="#user">User interaction</A> -->
651 <A HREF="#user">ユーザとのやりとり</A>
652 <LI>
653 <!-- <A HREF="#prefs">Preferences</A> -->
654 <A HREF="#prefs">環境設定</A>
655 <LI>
656 <!-- <A HREF="#math">Math</A> -->
657 <A HREF="#math">数学関数</A>
658 <LI>
659 <A HREF="#unicode">Unicode</A>
660 <LI>
661 <!-- <A HREF="#strings">String manipulation</A> -->
662 <A HREF="#strings">文字列操作</A>
663 <LI>
664 <!-- <A HREF="#arrays">Arrays</A> -->
665 <A HREF="#arrays">配列</A>
666 <LI>
667 <!-- <A HREF="#misc">Miscellaneous</A> -->
668 <A HREF="#misc">その他</A>
669 <LI>
670 <!-- <A HREF="#Deprecated">Deprecated</A> Names -->
671 <A HREF="#Deprecated">廃止された</A>名前
672 </UL>
673 <!--
674 <H3 ALIGN=Center>
675 <!--Built-in procedures in <A NAME="alpha">alphabetic</A> order -->
676 組込み手続きの<A NAME="alpha">アルファベット順</A>一覧
677 </H3>
678 <P ALIGN=Center>
679 - <A HREF="scripting-alpha.html#A">A</A> -
680 <A HREF="scripting-alpha.html#B">B</A> -
681 <A HREF="scripting-alpha.html#C">C</A> -
682 <A HREF="scripting-alpha.html#D">D</A> -
683 <A HREF="scripting-alpha.html#E">E</A> -
684 <A HREF="scripting-alpha.html#F">F</A> -
685 <A HREF="scripting-alpha.html#G">G</A> -
686 <A HREF="scripting-alpha.html#H">H</A> - <A HREF="scripting-alpha.html#I">I
687 </A>- <A HREF="scripting-alpha.html#J">J </A>-
688 <A HREF="scripting-alpha.html#K">K</A> -
689 <A HREF="scripting-alpha.html#L">L</A> -
690 <A HREF="scripting-alpha.html#M">M</A> -
691 <A HREF="scripting-alpha.html#N">N</A> -
692 <A HREF="scripting-alpha.html#O">O</A> -
693 <A HREF="scripting-alpha.html#P">P</A> -
694 <A HREF="scripting-alpha.html#Q">Q</A> -
695 <A HREF="scripting-alpha.html#R">R</A> -
696 <A HREF="scripting-alpha.html#S">S</A> - <A HREF="scripting-alpha.html#T">T
697 </A>- <A HREF="scripting-alpha.html#U">U </A>-
698 <A HREF="scripting-alpha.html#V">V </A>-
699 <A HREF="scripting-alpha.html#W">W</A> - <A HREF="scripting-alpha.html#X">X
700 </A>- <A HREF="scripting-alpha.html#Y">Y</A> -
701 <A HREF="scripting-alpha.html#Z">Z </A>-
702 <H3 ALIGN=Center>
703 <!--Built-in procedures that do not require a <A NAME="no-font">loaded font</A> -->
704 <A NAME="no-font">フォントを読み込む</A>必要がない組込み手続き</A></H3>
705 </H3>
706 <UL>
707 <LI>
708 <A HREF="scripting-alpha.html#Array">Array(size)</A>
709 <LI>
710 <A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
711 <LI>
712 <A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
713 <LI>
714 <A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
715 <LI>
716 <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
717 <LI>
718 <A HREF="scripting-alpha.html#Cos">Cos(val)</A>
719 <LI>
720 <A HREF="scripting-alpha.html#Floor">Floor(real)</A>
721 <LI>
722 <A HREF="scripting-alpha.html#Error">Error(str)</A>
723 <LI>
724 <A HREF="scripting-alpha.html#Exp">Exp(val)</A>
725 <LI>
726 <A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
727 <LI>
728 <A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
729 <LI>
730 <A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
731 <LI>
732 <A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
733 <LI>
734 <A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
735 <LI>
736 <A HREF="scripting-alpha.html#Int">Int(real)</A>
737 <LI>
738 <A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
739 <LI>
740 <A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
741 <LI>
742 <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
743 <LI>
744 <A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
745 <LI>
746 <A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
747 <LI>
748 <A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
749 <LI>
750 <A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
751 <LI>
752 <A HREF="scripting-alpha.html#Log">Log(val)</A>
753 <LI>
754 <A HREF="scripting-alpha.html#New">New()</A>
755 <LI>
756 <A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
757 <LI>
758 <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
759 <LI>
760 <A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
761 <LI>
762 <A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
763 <LI>
764 <A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
765 <LI>
766 <A HREF="scripting-alpha.html#Rand">Rand()</A>
767 <LI>
768 <A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
769 <LI>
770 <A HREF="scripting-alpha.html#Real">Real(int)</A>
771 <LI>
772 <A HREF="scripting-alpha.html#Round">Round(real)</A>
773 <LI>
774 <A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
775 <LI>
776 <A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
777 <LI>
778 <A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
779 <LI>
780 <A HREF="scripting-alpha.html#Sin">Sin(val)</A>
781 <LI>
782 <A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
783 <LI>
784 <A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
785 <LI>
786 <A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
787 <LI>
788 <A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
789 <LI>
790 <A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
791 <LI>
792 <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
793 <LI>
794 <A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
795 <LI>
796 <A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
797 <LI>
798 <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
799 <LI>
800 <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
801 <LI>
802 <A HREF="scripting-alpha.html#Tan">Tan(val)</A>
803 <LI>
804 <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
805 <LI>
806 <A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
807 <LI>
808 <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
809 <LI>
810 <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
811 <LI>
812 <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
813 <LI>
814 <A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
815 </UL>
816 <!--
817 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="file-menu">File Menu</A></H3> -->
818 <H3 ALIGN=Center><A NAME="file-menu"><CODE>ファイル(<U>F</U>)</CODE>メニュー</A>と同じようにふるまう組込み手続き</H3>
819 <UL>
820 <LI>
821 <A HREF="scripting-alpha.html#Close">Close()</A>
822 <LI>
823 <A HREF="scripting-alpha.html#ControlAfmLigatureOutput">ControlAfmLigatureOutput(script,lang,ligature-tag-list)</A>
824 <LI>
825 <A HREF="scripting-alpha.html#Export">Export(format[,bitmap-size])</A>
826 <LI>
827 <A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
828 <LI>
829 <A HREF="scripting-alpha.html#Generate">Generate(filename[,bitmaptype[,fmflags[,res[,mult-sfd-file[,namelist-name]]]]])</A>
830 <LI>
831 <A HREF="scripting-alpha.html#GenerateFamily">GenerateFamily(filename,bitmaptype,fmflags,array-of-font-filenames)</A>
832 <LI>
833 <A HREF="scripting-alpha.html#Import">Import(filename[,toback[,flags]])</A>
834 <LI>
835 <A HREF="scripting-alpha.html#MergeKern">MergeKern(filename)</A>
836 <LI>
837 <A HREF="scripting-alpha.html#New">New()</A>
838 <LI>
839 <A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
840 <LI>
841 <A HREF="scripting-alpha.html#PrintFont">PrintFont(type[,pointsize[,sample-text/filename[,output-file]]])</A>
842 <LI>
843 <A HREF="scripting-alpha.html#PrintSetup">PrintSetup(type,[printer[,width,height]])</A>
844 <LI>
845 <A HREF="scripting-alpha.html#Quit">Quit(status)</A>
846 <LI>
847 <A HREF="scripting-alpha.html#Save">Save([filename])</A>
848 </UL>
849 <!--
850 <H3 ALIGN=Center><A NAME="files">File Manipulation</A></H3> -->
851 <H3 ALIGN=Center><A NAME="files">ファイル操作</A></H3>
852 <UL>
853 <LI>
854 <A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
855 <LI>
856 <A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
857 <LI>
858 <A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
859 </UL>
860 <!--
861 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="edit-menu">Edit Menu</A></H3> -->
862 <H3 ALIGN=Center><A NAME="edit-menu"><CODE>編集(<U>E</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
863 <UL>
864 <LI>
865 <A HREF="scripting-alpha.html#Clear">Clear</A>
866 <LI>
867 <A HREF="scripting-alpha.html#ClearBackground">ClearBackground</A>
868 <LI>
869 <A HREF="scripting-alpha.html#Copy">Copy</A>
870 <LI>
871 <A HREF="scripting-alpha.html#CopyFgToBd">CopyFgToBd</A>
872 <LI>
873 <A HREF="scripting-alpha.html#CopyGlyphFeatures">CopyGlyphFeatures(arg,...)</A>
874 <LI>
875 <A HREF="scripting-alpha.html#CopyLBearing">CopyLBearing</A>
876 <LI>
877 <A HREF="scripting-alpha.html#CopyRBearing">CopyRBearing</A>
878 <LI>
879 <A HREF="scripting-alpha.html#CopyReference">CopyReference</A>
880 <LI>
881 <A HREF="scripting-alpha.html#CopyVWidth">CopyVWidth</A>
882 <LI>
883 <A HREF="scripting-alpha.html#CopyWidth">CopyWidth</A>
884 <LI>
885 <A HREF="scripting-alpha.html#Cut">Cut</A>
886 <LI>
887 <A HREF="scripting-alpha.html#Join">Join([fudge])</A>
888 <LI>
889 <A HREF="scripting-alpha.html#Paste">Paste</A>
890 <LI>
891 <A HREF="scripting-alpha.html#Paste">PasteInto</A>
892 <LI>
893 <A HREF="scripting-alpha.html#PasteWithOffset">PasteWithOffset(xoff,yoff)</A>
894 <LI>
895 <A HREF="scripting-alpha.html#ReplaceWithReference">ReplaceWithReference([fudge])</A>
896 <LI>
897 <A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
898 <LI>
899 <A HREF="scripting-alpha.html#UnlinkReference">UnlinkReference</A>
900 </UL>
901 <!--
902 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="select-menu">Select Menu</A></H3> -->
903 <H3 ALIGN=Center><A NAME="select-menu"><CODE>選択(<U>S</U>)</CODE>サブメニュー</A>のようにふるまう組込み手続き</H3>
904 <UL>
905 <LI>
906 <A HREF="scripting-alpha.html#Select">Select(arg1, arg2, ...)</A>
907 <LI>
908 <A HREF="scripting-alpha.html#SelectAll">SelectAll</A>
909 <LI>
910 <A HREF="scripting-alpha.html#SelectAllInstancesOf">SelectAllInstancesOf</A>(name1[,...])
911 <LI>
912 <A HREF="scripting-alpha.html#SelectBitmap">SelectBitmap(size)</A>
913 <LI>
914 <A HREF="scripting-alpha.html#SelectByATT">SelectByATT(type,tags,contents,search-type)</A>
915 <LI>
916 <A HREF="scripting-alpha.html#SelectChanged">SelectChanged([merge])</A>
917 <LI>
918 <A HREF="scripting-alpha.html#SelectFewer">SelectFewer(arg1, arg2, ...)</A>
919 <LI>
920 <A HREF="scripting-alpha.html#SelectFewerSingletons">SelectFewerSingletons(arg1, ...)</A>
921 <LI>
922 <A HREF="scripting-alpha.html#SelectHintingNeeded">SelectHintingNeeded([merge])</A>
923 <LI>
924 <A HREF="scripting-alpha.html#SelectIf">SelectIf(arg1,arg2, ...)</A>
925 <LI>
926 <A HREF="scripting-alpha.html#SelectInvert">SelectInvert()</A>
927 <LI>
928 <A HREF="scripting-alpha.html#SelectMore">SelectMore(arg1, arg2, ...)</A>
929 <LI>
930 <A HREF="scripting-alpha.html#SelectMoreSingletons">SelectMoreSingletons(arg1, ...)</A>
931 <LI>
932 <A HREF="scripting-alpha.html#SelectNone">SelectNone()</A>
933 <LI>
934 <A HREF="scripting-alpha.html#SelectSingletons">SelectSingletons(arg1, ...)</A>
935 <LI>
936 <A HREF="scripting-alpha.html#SelectWorthOutputting">SelectWorthOutputting()</A>
937 </UL>
938 <!--
939 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="element-menu">Element Menu</A></H3> -->
940 <H3 ALIGN=Center><A NAME="element-menu"><CODE>エレメント(<U>L</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
941 <UL>
942 <LI>
943 <A HREF="scripting-alpha.html#AddAccent">AddAccent(accent[,pos])</A>
944 <LI>
945 <A HREF="scripting-alpha.html#AddExtrema">AddExtrema()</A>
946 <LI>
947 <A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
948 <LI>
949 <A HREF="scripting-alpha.html#AutoTrace">AutoTrace()</A>
950 <LI>
951 <A HREF="scripting-alpha.html#BitmapsAvail">BitmapsAvail(sizes)</A>
952 <LI>
953 <A HREF="scripting-alpha.html#BitmapsRegen">BitmapsRegen(sizes)</A>
954 <LI>
955 <A HREF="scripting-alpha.html#BuildAccented">BuildAccented()</A>
956 <LI>
957 <A HREF="scripting-alpha.html#BuildComposite">BuildComposite()</A>
958 <LI>
959 <A HREF="scripting-alpha.html#BuildDuplicate">BuildDuplicate()</A>
960 <LI>
961 <A HREF="scripting-alpha.html#CanonicalContours">CanonicalContours</A>()
962 <LI>
963 <A HREF="scripting-alpha.html#CanonicalStart">CanonicalStart</A>()
964 <LI>
965 <A HREF="scripting-alpha.html#CompareFonts">CompareFonts(other-font-filename,output-filename,flags)</A>
966 <LI>
967 <A HREF="scripting-alpha.html#CompareGlyphs">CompareGlyphs([pt_err[,spline_err[,pixel_off_frac[,bb_err[,compare_hints[,report_diffs_as_errors]]]]]])</A>
968 <LI>
969 <A HREF="scripting-alpha.html#CorrectDirection">CorrectDirection([unlinkrefs])</A>
970 <LI>
971 <A HREF="scripting-alpha.html#DefaultRoundToGrid">DefaultRoundToGrid()</A>
972 <LI>
973 <A HREF="scripting-alpha.html#DefaultUseMyMetrics">DefaultUseMyMetrics()</A>
974 <LI>
975 <A HREF="scripting-alpha.html#ExpandStroke">ExpandStroke(width)</A>
976 <LI>
977 <A HREF="scripting-alpha.html#FindIntersections">FindIntersections()</A>
978 <LI>
979 <A HREF="scripting-alpha.html#HFlip">HFlip([about-x])</A>
980 <LI>
981 <A HREF="scripting-alpha.html#Inline">Inline(width,gap)</A>
982 <LI>
983 <A HREF="scripting-alpha.html#InterpolateFonts">InterpolateFonts(percentage,other-font-name[,flags])</A>
984 <LI>
985 <A HREF="scripting-alpha.html#MergeFonts">MergeFonts(other-font-name[,flags])</A>
986 <LI>
987 <A HREF="scripting-alpha.html#Move">Move(delta-x,delta-y)</A>
988 <LI>
989 <A HREF="scripting-alpha.html#MoveReference">MoveReference(delta-x,delta-y,[refname/ref-unicode]+)</A>
990 <LI>
991 <A HREF="scripting-alpha.html#NearlyHvCps">NearlyHvCps([error[,err-denom]])</A>
992 <LI>
993 <A HREF="scripting-alpha.html#NearlyHvLines">NearlyHvLines([error[,err-denom]])</A>
994 <LI>
995 <A HREF="scripting-alpha.html#NearlyLines">NearlyLines(error)</A>
996 <LI>
997 <A HREF="scripting-alpha.html#NonLinearTransform">NonLinearTransform(x-expression,y-expression)</A>
998 <LI>
999 <A HREF="scripting-alpha.html#Outline">Outline(width)</A>
1000 <LI>
1001 <A HREF="scripting-alpha.html#OverlapIntersect">OverlapIntersect()</A>
1002 <LI>
1003 <A HREF="scripting-alpha.html#PositionReference">PositionReference(x,y,[refname/ref-unicode]+)</A>
1004 <LI>
1005 <A HREF="scripting-alpha.html#RemoveOverlap">RemoveOverlap()</A>
1006 <LI>
1007 <A HREF="scripting-alpha.html#Rotate">Rotate(angle[,ox,oy])</A>
1008 <LI>
1009 <A HREF="scripting-alpha.html#RoundToCluster">RoundToCluster([within[,max]])</A>
1010 <LI>
1011 <A HREF="scripting-alpha.html#RoundToInt">RoundToInt([factor])</A>
1012 <LI>
1013 <A HREF="scripting-alpha.html#Scale">Scale(factor[,yfactor][,ox,oy])</A>
1014 <LI>
1015 <A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
1016 <LI>
1017 <A HREF="scripting-alpha.html#Shadow">Shadow(angle,outline-width,shadow-width)</A>
1018 <LI>
1019 <A HREF="scripting-alpha.html#Simplify">Simplify()</A>
1020 <LI>
1021 <A HREF="scripting-alpha.html#Skew">Skew(angle[,ox,oy])</A>
1022 <LI>
1023 <A HREF="scripting-alpha.html#Transform">Transform(t1,t2,t3,t4,t5,t6)</A>
1024 <LI>
1025 <A HREF="scripting-alpha.html#VFlip">VFlip([about-y])</A>
1026 <LI>
1027 <A HREF="scripting-alpha.html#Wireframe">Wireframe(angle,outline-width,shadow-width)</A>
1028 </UL>
1029 <!--
1030 <H3 ALIGN=Center><A NAME="font-info">Font Info</A></H3> -->
1031 <H3 ALIGN=Center><A NAME="font-info">フォント情報</A></H3>
1032 <UL>
1033 <LI>
1034 <A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
1035 <LI>
1036 <A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
1037 <LI>
1038 <A HREF="scripting-alpha.html#GetFontBoundingBox">GetFontBoundingBox()</A>
1039 <LI>
1040 <A HREF="scripting-alpha.html#GetMaxpValue">GetMaxpValue(field-name)</A>
1041 <LI>
1042 <A HREF="scripting-alpha.html#GetOS2Value">GetOS2Value(field-name)</A>
1043 <LI>
1044 <A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
1045 <LI>
1046 <A HREF="scripting-alpha.html#GetTeXParam">GetTeXParam(index)</A>
1047 <LI>
1048 <A HREF="scripting-alpha.html#GetTTFName">GetTTFName(lang,nameid)</A>
1049 <LI>
1050 <A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
1051 <LI>
1052 <A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
1053 <LI>
1054 <A HREF="scripting-alpha.html#SetFondName">SetFondName(fondname)</A>
1055 <LI>
1056 <A HREF="scripting-alpha.html#SetFontHasVerticalMetrics">SetFontHasVerticalMetrics(flag)</A>
1057 <LI>
1058 <A HREF="scripting-alpha.html#SetFontNames">SetFontNames(fontname[,family[,fullname[,weight[,copyright-notice[,fontversion]]]]])</A>
1059 <LI>
1060 <A HREF="scripting-alpha.html#SetFontOrder">SetFontOrder(order)</A>
1061 <LI>
1062 <A HREF="scripting-alpha.html#SetItalicAngle">SetItalicAngle(angle[,denom])</A>
1063 <LI>
1064 <A HREF="scripting-alpha.html#SetMacStyle">SetMacStyle(val)</A>
1065 <LI>
1066 <A HREF="scripting-alpha.html#SetMaxpValue">SetMaxpValue(field-name,value)</A>
1067 <LI>
1068 <A HREF="scripting-alpha.html#SetOS2Value">SetOS2Value(field-name,field-value)</A>
1069 <LI>
1070 <A HREF="scripting-alpha.html#SetPanose">SetPanose(array) SetPanose(index,value)</A>
1071 <LI>
1072 <A HREF="scripting-alpha.html#SetTeXParams">SetTeXParams(type,design-size,slant,space,stretch,shrink,xheight,quad,extraspace[...])</A>
1073 <LI>
1074 <A HREF="scripting-alpha.html#SetTTFName">SetTTFName(lang,nameid,utf8-string)</A>
1075 <LI>
1076 <A HREF="scripting-alpha.html#SetUniqueID">SetUniqueID(value)</A>
1077 <LI>Some items (such as the font name) may be retrieved via built-in variables.
1078 </UL>
1079 <!--
1080 <H3 ALIGN=Center><A NAME="glyph-info">Glyph Info</A></H3> -->
1081 <H3 ALIGN=Center><A NAME="glyph-info">グリフ情報</A></H3>
1082 <UL>
1083 <LI>
1084 <A HREF="scripting-alpha.html#DrawsSomething">DrawsSomething([arg])</A>
1085 <LI>
1086 <A HREF="scripting-alpha.html#GetPosSub">GetPosSub(feature-tag,script,lang)</A>
1087 <LI>
1088 <A HREF="scripting-alpha.html#GlyphInfo">GlyphInfo(str)</A>
1089 <LI>
1090 <A HREF="scripting-alpha.html#SetGlyphColor">SetCharColor(color)</A>
1091 <LI>
1092 <A HREF="scripting-alpha.html#SetGlyphComment">SetGlyphComment(comment)</A>
1093 <LI>
1094 <A HREF="scripting-alpha.html#SetCharName">SetGlyphName(name[,set-from-name-flag])</A>
1095 <LI>
1096 <A HREF="scripting-alpha.html#SetlyphChanged">SetGlyphChanged(flag)</A>
1097 <LI>
1098 <A HREF="scripting-alpha.html#SetGlyphClass">SetGlyphClass(class-name)</A>
1099 <LI>
1100 <A HREF="scripting-alpha.html#SetUnicodeValue">SetUnicodeValue(uni[,set-from-value-flag])</A>
1101 <LI>
1102 <A HREF="scripting-alpha.html#SetGlyphTeX">SetGlyphTeX(height,depth[,subpos,suppos])</A>
1103 <LI>
1104 <A HREF="scripting-alpha.html#WorthOutputting">WorthOutputting([arg])</A>
1105 </UL>
1106 <!--
1107 <H3 ALIGN=Center>Built-in procedures that handle <A NAME="ATT">Advanced Typography</A></H3> -->
1108 <H3 ALIGN=Center><A NAME="ATT">高度組版機能</A>を操作する組込み手続き</H3>
1109 <UL>
1110 <LI>
1111 <A HREF="scripting-alpha.html#AddAnchorClass">AddAnchorClass(name,type,script-lang,tag,flags,merge-with)</A>
1112 <LI>
1113 <A HREF="scripting-alpha.html#AddAnchorPoint">AddAnchorPoint(name,type,x,y[,lig-index])</A>
1114 <LI>
1115 <A HREF="scripting-alpha.html#AddATT">AddATT(type,script-lang,tag,flags,variant)</A>
1116 <LI>
1117 <A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
1118 <LI>
1119 <A HREF="scripting-alpha.html#CheckForAnchorClass">CheckForAnchorClass(name)</A>
1120 <LI>
1121 <A HREF="scripting-alpha.html#DefaultATT">DefaultATT(tag)</A>
1122 <LI>
1123 <A HREF="scripting-alpha.html#HasPreservedTable">HasPreservedTable(tag)</A>
1124 <LI>
1125 <A HREF="scripting-alpha.html#LoadTableFromFile">LoadTableFromFile(tag,filename)</A>
1126 <LI>
1127 <A HREF="scripting-alpha.html#GetPosSub">GetPosSub(feature-tag,script,lang)</A>
1128 <LI>
1129 <A HREF="scripting-alpha.html#RemoveATT">RemoveATT(type,script-lang,tag)</A>
1130 <LI>
1131 <A HREF="scripting-alpha.html#RemoveAnchorClass">RemoveAnchorClass(name)</A>
1132 <LI>
1133 <A HREF="scripting-alpha.html#RemovePreservedTable">RemovePreservedTable(tag)</A>
1134 <LI>
1135 <A HREF="scripting-alpha.html#SaveTableToFile">SaveTableToFile(tag,filename)</A>
1136 </UL>
1137 <!--
1138 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="encoding-menu">Encoding Menu</A></H3> -->
1139 <H3 ALIGN=Center><A NAME="encoding-menu"><CODE>エンコーディング(<U>N</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
1140 <UL>
1141 <LI>
1142 <A HREF="scripting-alpha.html#CharCnt">CharCnt()</A>
1143 <LI>
1144 <A HREF="scripting-alpha.html#DetachGlyphs">DetachGlyphs</A>
1145 <LI>
1146 <A HREF="scripting-alpha.html#DetachAndRemoveGlyphs">DetachAndRemoveGlyphs</A>
1147 <LI>
1148 <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
1149 <LI>
1150 <A HREF="scripting-alpha.html#MultipleEncodingsToReferences">MultipleEncodingsToReferences()</A>
1151 <LI>
1152 <A HREF="scripting-alpha.html#Reencode">Reencode(encoding-name[,force])</A>
1153 <LI>
1154 <A HREF="scripting-alpha.html#RemoveDetachedGlyphs">RemoveDetachedGlyphs</A>()
1155 <LI>
1156 <A HREF="scripting-alpha.html#RenameGlyphs">RenameGlyphs(namelist-name)</A>
1157 <LI>
1158 <A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
1159 <LI>
1160 <A HREF="scripting-alpha.html#SetCharCnt">SetCharCnt(cnt)</A>
1161 </UL>
1162 <!--
1163 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="hint-menu">Hint Menu</A></H3> -->
1164 <H3 ALIGN=Center><A NAME="hint-menu"><CODE>ヒント(<U>H</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
1165 <UL>
1166 <LI>
1167 <A HREF="scripting-alpha.html#AddHHint">AddHHint(start,width)</A>
1168 <LI>
1169 <A HREF="scripting-alpha.html#AddInstrs">AddInstrs(thingamy,replace,instrs)</A>
1170 <LI>
1171 <A HREF="scripting-alpha.html#AddVHint">AddVHint(start,width)</A>
1172 <LI>
1173 <A HREF="scripting-alpha.html#AutoCounter">AutoCounter()</A>
1174 <LI>
1175 <A HREF="scripting-alpha.html#AutoHint">AutoHint()</A>
1176 <LI>
1177 <A HREF="scripting-alpha.html#AutoInstr">AutoInstr()</A>
1178 <LI>
1179 <A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
1180 <LI>
1181 <A HREF="scripting-alpha.html#ClearCharCounterMasks">ClearCharCounterMasks()</A>
1182 <LI>
1183 <A HREF="scripting-alpha.html#ClearHints">ClearHints()</A>
1184 <LI>
1185 <A HREF="scripting-alpha.html#ClearInstrs">ClearInstrs()</A>
1186 <LI>
1187 <A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
1188 <LI>
1189 <A HREF="scripting-alpha.html#ClearTable">ClearTable(tag)</A>
1190 <LI>
1191 <A HREF="scripting-alpha.html#DontAutoHint">DontAutoHint()</A>
1192 <LI>
1193 <A HREF="scripting-alpha.html#FindOrAddCvtIndex">FindOrAddCvtIndex(value[,sign-matters])</A>
1194 <LI>
1195 <A HREF="scripting-alpha.html#GetCvtAt">GetCvtAt(index)</A>
1196 <LI>
1197 <A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
1198 <LI>
1199 <A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
1200 <LI>
1201 <A HREF="scripting-alpha.html#PrivateToCvt">PrivateToCvt()</A>
1202 <LI>
1203 <A HREF="scripting-alpha.html#ReplaceCharCounterMasks">ReplaceCharCounterMasks(array)</A>
1204 <LI>
1205 <A HREF="scripting-alpha.html#ReplaceCvtAt">ReplaceCvtAt(index,value)</A>
1206 <LI>
1207 <A HREF="scripting-alpha.html#SetCharCounterMask">SetCharCounterMask(cg,hint-index,hint-index,...)</A>
1208 <LI>
1209 <A HREF="scripting-alpha.html#SubstitutionPoints">SubstitutionPoints()</A>
1210 </UL>
1211 <!--
1212 <H3 ALIGN=Center>Built-in procedures that act like the <A NAME="metrics-menu">Metrics Menu</A></H3> -->
1213 <H3 ALIGN=Center><A NAME="metrics-menu"><CODE>メトリック(<U>M</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
1214 <UL>
1215 <LI>
1216 <A HREF="scripting-alpha.html#AutoKern">AutoKern(spacing,threshold[,kernfile])</A>
1217 <LI>
1218 <A HREF="scripting-alpha.html#AutoWidth">AutoWidth(spacing)</A>
1219 <LI>
1220 <A HREF="scripting-alpha.html#CenterInWidth">CenterInWidth()</A>
1221 <LI>
1222 <A HREF="scripting-alpha.html#SetKern">SetKern(ch2,offset)</A>
1223 <LI>
1224 <A HREF="scripting-alpha.html#RemoveAllKerns">RemoveAllKerns()</A>
1225 <LI>
1226 <A HREF="scripting-alpha.html#RemoveAllVKerns">RemoveAllVKerns()</A>
1227 <LI>
1228 <A HREF="scripting-alpha.html#SetLBearing">SetLBearing(lbearing[,relative])</A>
1229 <LI>
1230 <A HREF="scripting-alpha.html#SetRBearing">SetRBearing(rbearing[,relative])</A>
1231 <LI>
1232 <A HREF="scripting-alpha.html#SetVKern">SetVKern(ch2,offset)</A>
1233 <LI>
1234 <A HREF="scripting-alpha.html#SetVWidth">SetVWidth(vertical-width[,relative])</A>
1235 <LI>
1236 <A HREF="scripting-alpha.html#SetWidth">SetWidth(width[,relative])</A>
1237 <LI>
1238 <A HREF="scripting-alpha.html#VKernFromHKern">VKernFromHKern()</A>
1239 </UL>
1240 <!--
1241 <H3 ALIGN=Center><A NAME="MM">Multiple master routines</A></H3> -->
1242 <H3 ALIGN=Center><A NAME="MM">マルチプルマスター操作ルーチン</A></H3>
1243 <LI>
1244 <A HREF="scripting-alpha.html#MMAxisBounds">MMAxisBounds(axis)</A>
1245 <LI>
1246 <A HREF="scripting-alpha.html#MMAxisNames">MMAxisNames()</A>
1247 <LI>
1248 <A HREF="scripting-alpha.html#MMBlendToNewFont">MMBlendToNewFont(weights)</A>
1249 <LI>
1250 <A HREF="scripting-alpha.html#MMChangeInstance">MMChangeInstance(instance)</A>
1251 <LI>
1252 <A HREF="scripting-alpha.html#MMChangeWeight">MMChangeWeight(weights)</A>
1253 <LI>
1254 <A HREF="scripting-alpha.html#MMInstanceNames">MMInstanceNames()</A>
1255 <LI>
1256 <A HREF="scripting-alpha.html#MMWeightedName">MMWeightedName()</A>
1257 </UL>
1258 <!--
1259 <H3 ALIGN=Center><A NAME="CID">CID routines</A></H3> -->
1260 <H3 ALIGN=Center><A NAME="CID">CID フォント操作ルーチン</A></H3>
1261 <LI>
1262 <A HREF="scripting-alpha.html#CIDChangeSubFont">CIDChangeSubFont(new-sub-font-name)</A>
1263 <LI>
1264 <A HREF="scripting-alpha.html#CIDFlatten">CIDFlatten()</A>
1265 <LI>
1266 <A HREF="scripting-alpha.html#CIDFlattenByCMap">CIDFlattenByCMap(cmap-filename)</A>
1267 <LI>
1268 <A HREF="scripting-alpha.html#CIDSetFontNames">CIDSetFontNames(fontname[,family[,fullname[,weight[,copyright-notice]]]])</A>
1269 <LI>
1270 <A HREF="scripting-alpha.html#ConvertToCID">ConvertToCID(registry, ordering, supplement)</A>
1271 <LI>
1272 <A HREF="scripting-alpha.html#ConvertByCMap">ConvertByCMap(cmapfilename)</A>
1273 <UL>
1274 </UL>
1275 <!--
1276 <H3 ALIGN=Center><A NAME="user">User Interaction</A></H3> -->
1277 <H3 ALIGN=Center><A NAME="user">ユーザとのやりとり</A></H3>
1278 <UL>
1279 <LI>
1280 <A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
1281 <LI>
1282 <A HREF="scripting-alpha.html#Error">Error(str)</A>
1283 <LI>
1284 <A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
1285 <LI>
1286 <A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
1287
1288 </UL>
1289 <!--
1290 <H3 ALIGN=Center><A NAME="prefs">Preferences</A></H3> -->
1291 <H3 ALIGN=Center><A NAME="prefs">環境設定</A></H3>
1292 <UL>
1293 <LI>
1294 <A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
1295 <LI>
1296 <A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
1297 <LI>
1298 <A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
1299 <LI>
1300 <A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
1301 <LI>
1302 <A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
1303 <LI>
1304 <A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
1305 <LI>
1306 <A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
1307 <LI>
1308 <A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
1309 <LI>
1310 <A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
1311 <!--
1312 <LI>It it also possible to get the value of a preference item by preceding its
1313 name with a dollar sign. -->
1314 <LI>環境設定項目の値は、項目名の前にドル記号 ($) をつけた名前の変数によって得ることもできます。
1315 </UL>
1316 <!--
1317 <H3 ALIGN=Center><A NAME="math">Math</A></H3> -->
1318 <H3 ALIGN=Center><A NAME="math">数学関数</A></H3>
1319 <UL>
1320 <LI>
1321 <A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
1322 <LI>
1323 <A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
1324 <LI>
1325 <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
1326 <LI>
1327 <A HREF="scripting-alpha.html#Cos">Cos(val)</A>
1328 <LI>
1329 <A HREF="scripting-alpha.html#Exp">Exp(val)</A>
1330 <LI>
1331 <A HREF="scripting-alpha.html#Floor">Floor(real)</A>
1332 <LI>
1333 <A HREF="scripting-alpha.html#Int">Int(real)</A>
1334 <LI>
1335 <A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
1336 <LI>
1337 <A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
1338 <LI>
1339 <A HREF="scripting-alpha.html#Log">Log(val)</A>
1340 <LI>
1341 <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
1342 <LI>
1343 <A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
1344 <LI>
1345 <A HREF="scripting-alpha.html#Rand">Rand()</A>
1346 <LI>
1347 <A HREF="scripting-alpha.html#Real">Real(int)</A>
1348 <LI>
1349 <A HREF="scripting-alpha.html#Round">Round(real)</A>
1350 <LI>
1351 <A HREF="scripting-alpha.html#Sin">Sin(val)</A>
1352 <LI>
1353 <A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
1354 <LI>
1355 <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
1356 <LI>
1357 <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
1358 <LI>
1359 <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
1360 <LI>
1361 <A HREF="scripting-alpha.html#Tan">Tan(val)</A>
1362 <LI>
1363 <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
1364 <LI>
1365 <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
1366
1367 </UL>
1368 <H3 ALIGN=Center><A NAME="unicode">Unicode</A></H3>
1369 <UL>
1370 <LI>
1371 <A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
1372 <LI>
1373 <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
1374 <LI>
1375 <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
1376 </UL>
1377 <!--
1378 <H3 ALIGN=Center><A NAME="strings">String manipulation</A></H3> -->
1379 <H3 ALIGN=Center><A NAME="strings">文字列操作</A></H3>
1380 <UL>
1381 <LI>
1382 <A HREF="scripting-alpha.html#Chr">Chr(int)</A>
1383 <LI>
1384 <A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
1385 <LI>
1386 <A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
1387 <LI>
1388 <A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
1389 <LI>
1390 <A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
1391 <LI>
1392 <A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
1393 <LI>
1394 <A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
1395 <LI>
1396 <A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
1397 <LI>
1398 <A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
1399 <LI>
1400 <A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
1401 <LI>
1402 <A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
1403 <LI>
1404 <A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
1405 <LI>
1406 <A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
1407 <LI>
1408 <A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
1409 <LI>
1410 <A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
1411 </UL>
1412 <!--
1413 <H3 ALIGN=Center><A NAME="arrays">Arrays</A></H3> -->
1414 <H3 ALIGN=Center><A NAME="arrays">配列操作</A></H3>
1415 <UL><LI>
1416 <A HREF="scripting-alpha.html#Array">Array(size)</A>
1417 <LI>
1418 <A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
1419 </UL>
1420 <!--
1421 <H3 ALIGN=Center><A NAME="misc">Miscellaneous</A></H3> -->
1422 <H3 ALIGN=Center><A NAME="misc">その他</A></H3>
1423 <UL>
1424 <LI>
1425 <A HREF="scripting-alpha.html#InFont">InFont(arg)</A>
1426 <LI>
1427 <A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
1428 <H3 ALIGN=Center>
1429 <!--<A NAME="Deprecated">Deprecated Names</A> -->
1430 <A NAME="Deprecated">廃止された名前</A>
1431 </H3>
1432 <UL>
1433 <LI>
1434 <A HREF="scripting-alpha.html#ClearGlyphCounterMasks">ClearCharCounterMasks()</A>
1435 <LI>
1436 <A HREF="scripting-alpha.html#GlyphInfo">CharInfo(str)</A>
1437 <LI>
1438 <A HREF="scripting-alpha.html#ReplaceGlyphCounterMasks">ReplaceCharCounterMasks(array)</A>
1439 <LI>
1440 <A HREF="scripting-alpha.html#SetGlyphColor">SetCharColor(color)</A>
1441 <LI>
1442 <A HREF="scripting-alpha.html#SetGlyphComment">SetCharComment(comment)</A>
1443 <LI>
1444 <A HREF="scripting-alpha.html#SetGlyphCounterMask">SetCharCounterMask(cg,hint-index,hint-index,...)</A>
1445 <LI>
1446 <A HREF="scripting-alpha.html#SetGlyphName">SetCharName(name[,set-from-name-flag])</A>
1447 </UL>
1448 <P>
1449 <HR>
1450 <H2>
1451 <!-- <A NAME="Example">Example</A>s -->
1452 <A NAME="Example">例</A>
1453 </H2>
1454 <UL>
1455 <LI>
1456 <!-- <A HREF="http://cvs.sourceforge.net/viewcvspy/fontforge/fontforge/test/">FontForge's
1457 testsuite</A> (such as it is) -->
1458 <A HREF="http://cvs.sourceforge.net/viewcvs.py/fontforge/fontforge/test/">FontForge
1459 のテストスイート</A> (という程の物ではないが)
1460 <LI>
1461 <!-- <A HREF="scripts/">Directory of donated scripts</A>-->
1462 <A HREF="scripts/">寄贈されたスクリプトのディレクトリ</A>
1463 <LI>
1464 <!-- Scripts used in other projects-->
1465 その他のプロジェクトで使用されているスクリプト
1466 <UL>
1467 <LI>
1468 <A HREF="http://sourceforge.net/projects/x-symbol/">x-symbol</A>
1469 </UL>
1470 <LI>
1471 <!-- <A HREF="scripting-tutorial.html">the scripting tutorial</A> -->
1472 <A HREF="scripting-tutorial.html">スクリプト処理のチュートリアル</A>
1473 </UL>
1474 <H3>
1475 <!--Example 1:-->
1476 例 1:
1477 </H3>
1478 <BLOCKQUOTE>
1479 <PRE>#<!--Set the color of all selected glyphs to be yellow--> 選択中のすべてのグリフの色を黄色に設定する。
1480 #<!--designed to be run within an interactive fontforge session.--> FontForge の対話的なセッション中で動かすように作られている。
1481 foreach
1482 SetCharColor(0xffff00)
1483 endloop
1484 </PRE>
1485 </BLOCKQUOTE>
1486 <H3>
1487 <!--Example 2:-->
1488 例 2:
1489 </H3>
1490 <BLOCKQUOTE>
1491 <PRE>#!/usr/local/bin/fontforge
1492 <!--#This is the sfddiff script which compares two fonts --># 2つのフォントを比較する sfddiff スクリプト
1493
1494 if ( Strtol($version)<20060330 )
1495 Error( <!-- "Please upgrade to a more recent version of fontforge" -->"FontForge を新しいバージョンに更新してください" )
1496 endif
1497
1498 flags=0x789
1499 outfile=""
1500
1501 while ( $argc > 1 && Strsub($1,0,1)=="-" )
1502 temp = $1
1503 if ( Strsub(temp,1,2)=='-' )
1504 temp = Strsub(temp,1)
1505 endif
1506
1507 if ( temp=="-ignorehints" )
1508 flags = flags & ~0x8
1509 elseif ( temp=="-ignorenames" )
1510 flags = flags & ~0x100
1511 elseif ( temp=="-ignoregpos" )
1512 flags = flags & ~0x200
1513 elseif ( temp=="-ignoregsub" )
1514 flags = flags & ~0x400
1515 elseif ( temp=="-ignorebitmaps" )
1516 flags = flags & ~0x80
1517 elseif ( temp=="-exact" )
1518 flags = flags | 0x2
1519 elseif ( temp=="-warn" )
1520 flags = flags | 0x44
1521 elseif ( temp=="-merge" )
1522 flags = flags | 0x1800
1523 shift
1524 outfile = $1
1525 elseif ( temp=="-help" )
1526 Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] fontfile1 fontfile2" )
1527 Print( <!-- " Compares two fontfiles" -->" 2つのフォントファイルを比較する." )
1528 Print( <!-- " - -ignorehints: Do not compare postscript hints or truetype instructions" -->" --ignorehints: PostScript ヒントや TrueType 命令を比較しない" )
1529 Print( <!-- " - -ignorenames: Do not compare font names" -->" --ignorenames: フォント名を比較しない" )
1530 Print( <!-- " - -ignoregpos: Do not compare kerning, etc." -->" --ignoregpos: カーニング等の指定を比較しない" )
1531 Print( <!-- " - -ignoregsub: Do not compare ligatures, etc." -->" --ignoregsub: 合字等の指定を比較しない" )
1532 Print( <!-- " - -ignorebitmaps: Do not compare bitmap strikes" -->" --ignorebitmaps: ビットマップを比較しない" )
1533 Print( <!-- " --exact: Normally sfddiff will match contours which are not exact" -->" --exact: 通常は sfddiff は厳密に同一ではないもの両者の違いが微細な" )
1534 Print( <!-- " but where the differences are slight (so you could compare" -->" 文字列を一致した物と見なします (そのおかげで、TrueType と" )
1535 Print( <!-- " truetype and postscript and get reasonable answers). Also" -->" PostScirpt フォントを比較してまともな答えが得られます)." )
1536 Print( <!-- " normally sfddiff will unlink references before it compares" -->" また, sfddiff は比較を行う前に参照を展開します (それに" )
1537 Print( <!-- " (so you can compare a postscript font (with no references)" -->" より, (参照を含まない) PostScript フォントと (参照を含む)" )
1538 Print( <!-- " to the original source (which does have references)). Setting" -->" 元データを比較することができます). このフラグを設定した")
1539 Print( <!-- " this flag means glyphs must match exactly." -->" 場合, グリフが一致するかどうかの判定を厳密に行います.")
1540 Print( <!-- " --warn: Provides a warning when an exact match is not found" -->" --warn: 正確に一致しない物が無いときに, 詳しい情報を出力する" )
1541 Print( <!-- " --merge outfile: Put any outline differences in the backgrounds of" -->" --merge outfile: アウトラインの相異点があるとき, 適切なグリフの背景に" )
1542 Print( <!-- " appropriate glyphs" -->" 差分を書き出す" )
1543 return(0)
1544 elseif ( temp=="-version" )
1545 Print( "Version 1.0" )
1546 return(0)
1547 else
1548 break
1549 endif
1550 shift
1551 endloop
1552
1553 if ( $argc!=3 || $1=="--usage" || $1=="-usage" )
1554 Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] [--merge outfile] fontfile1 fontfile2" )
1555 return(0)
1556 endif
1557
1558 Open($2)
1559 Open($1)
1560 CompareFonts($2,"-",flags)
1561 if ( outfile!="" )
1562 Save(outfile)
1563 endif
1564 </PRE>
1565 </BLOCKQUOTE>
1566 <H3>
1567 <!--Example 3:-->
1568 例 3:
1569 </H3>
1570 <BLOCKQUOTE>
1571 <PRE>#!/usr/local/bin/fontforge
1572 #<!--Take a Latin font and apply some simple transformations to it--> ラテン文字のフォントをとり、キリル文字の追加に先だって、
1573 #<!--prior to adding cyrillic letters.--> いくつかの単純な変形を適用する。
1574 #<!--can be run in a non-interactive fontforge session.--> 非対話的な FontForge のセッションからも実行可能。
1575 Open($1);
1576 Reencode("KOI8-R");
1577 Select(0xa0,0xff);
1578 //<!--Copy those things which look just like latin--> ラテン文字と同じと思われるこれらの文字をコピーする
1579 BuildComposit();
1580 BuildAccented();
1581
1582 //<!--Handle Ya which looks like a backwards "R"--> "R" を裏返しにしたように見える "Я"(Ya) を処理する
1583 Select("R");
1584 Copy();
1585 Select("afii10049");
1586 Paste();
1587 HFlip();
1588 CorrectDirection();
1589 Copy();
1590 Select(0u044f);
1591 Paste();
1592 CopyFgToBg();
1593 Clear();
1594
1595 //<!--Gamma looks like an upside-down L--> "Г"(Gamma) は "L" を上下逆さまにしたように見える
1596 Select("L");
1597 Copy();
1598 Select(0u0413);
1599 Paste();
1600 VFlip();
1601 CorrectDirection();
1602 Copy();
1603 Select(0u0433);
1604 Paste();
1605 CopyFgToBg();
1606 Clear();
1607
1608 //<!--Prepare for editing small caps K, etc.--> 小型大文字の "K" などの編集の準備をする
1609 Select("K");
1610 Copy();
1611 Select(0u043a);
1612 Paste();
1613 CopyFgToBg();
1614 Clear();
1615
1616 Select("H");
1617 Copy();
1618 Select(0u043d);
1619 Paste();
1620 CopyFgToBg();
1621 Clear();
1622
1623 Select("T");
1624 Copy();
1625 Select(0u0442);
1626 Paste();
1627 CopyFgToBg();
1628 Clear();
1629
1630 Select("B");
1631 Copy();
1632 Select(0u0432);
1633 Paste();
1634 CopyFgToBg();
1635 Clear();
1636
1637 Select("M");
1638 Copy();
1639 Select(0u043C);
1640 Paste();
1641 CopyFgToBg();
1642 Clear();
1643
1644 Save($1:r+"-koi8-r.sfd");
1645 Quit(0);
1646 </PRE>
1647 </BLOCKQUOTE>
1648 <H2>
1649 <!--The <A NAME="Execute">Execute</A> Script dialog -->
1650 「<A NAME="Execute">スクリプトを実行</A>」ダイアログ
1651 </H2>
1652 <P>
1653 <!--
1654 This dialog allows you to type a script directly in to FontForge and then
1655 run it. Of course the most common case is that you'll have a script file
1656 somewhere that you want to execute, so there's a button [Call] down at the
1657 bottom of the dlg. Pressing [Call] will bring up a file picker dlg looking
1658 for files with the extension *.pe (you can change that by typing a wildcard
1659 sequence and pressing the [Filter] button). After you have selected your
1660 script the appropriate text to text to invoke it will be placed in the text
1661 area. -->
1662 このダイアログにより、FontForge の中でスクリプトを直接打ち込んで実行することができます。
1663 もちろん、一番多いケースは、実行したいスクリプトが既にどこかに存在する場合でしょう。そのために <CODE>[呼び出す(<U>A</U>)]</CODE> ボタンがダイアログの下についています。
1664 <CODE>[呼び出す(<U>A</U>)]</CODE> ボタンを押すと、*.pe の拡張子を持つファイルを探すためのファイル選択ダイアログが現れます (ワイルドカードシーケンスを入力して <CODE>[フィルタ]</CODE> ボタンを押すことにより、これを変更することができます)。
1665 スクリプトを選択すると、そのスクリプトを起動するためのコマンドがダイアログのテキストエリアに挿入されます。
1666 <P>
1667 <!--
1668 The current font of the script will be set to whatever font you invoked it
1669 from. -->
1670 スクリプトのカレントフォントは、つねにスクリプトの呼び出し元のフォントに設定されます。
1671 <H2>
1672 <!-- The Scripts <A NAME="menu">Menu</A>-->
1673 スクリプト<A NAME="menu">メニュー</A>
1674 </H2>
1675 <P>
1676 <!--
1677 You can use the preference dialog to create a list of frequently used scripts.
1678 Invoke <A HREF="prefs.html#scripts">File-&gt;Preferences</A> and select the
1679 Scripts tag. In this dialog are ten possible entries, each one should have
1680 a name (to be displayed in the menu) and an associated script file to be
1681 run. -->
1682 頻繁に使うスクリプトのリストを、プリファレンスダイアログを用いて作成することができます。<CODE><A HREF="prefs.html#scripts">ファイル(<U>F</U>)</CODE>→<CODE>環境設定(<U>E</U>)...</A></CODE> を起動し、<CODE>[スクリプトメニュー]</CODE> タブを選択してください。このダイアログには、10 個の入力可能な項目があり、それぞれに名前 (これがメニュー内に表示されます) と、それを指定した時に実行されるスクリプトファイル名の入力欄が含まれています。
1683 <P>
1684 <!--
1685 After you have set up your preferences you can invoke scripts from the font
1686 view, either directly from the menu (File-&gt;Scripts-&gt;&lt;your name&gt;)
1687 or by a hot key. The first script you added will be invoked by Cnt-Alt-1,
1688 then second by Cnt-Alt-2, and the tenth by Cnt-Alt-0. -->
1689 プリファレンスを設定した後、フォントビューからスクリプトを起動することができます。起動には、メニューから直接 (<CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトメニュー</CODE>→<CODE><I>(設定した名前)</I></CODE>) 起動するか、ホットキーを使用することができます。
1690 最初に追加したスクリプトは Ctl-Alt-1, 2 番目は Ctl-Alt-2 で起動でき、10 番目は Ctl-Alt-0 となります。
1691 <P>
1692 <!--
1693 The current font of the script will be set to whatever font you invoked it
1694 from. -->
1695 スクリプト内でのカレントフォントは、常に、それを呼び出したフォントにセットされます。
1696 <P>
1697 <P ALIGN=Center>
1698 — <A HREF="HotKeys.html">前</A> — <A HREF="overview.html">目次</A> —
1699 <A HREF="PfaEdit-TeX.html">次</A> —
1700 </DIV>
1701 </BODY></HTML>