Debian Codegraph @

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

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <!-- Created with AOLpress/2.0 -->
4 <!-- AP: Created on: 27-Sep-2003 -->
5 <!-- AP: Last modified: 21-Mar-2005 -->
6 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
7 <!--<TITLE>The Mac State Machine dialog</TITLE>-->
8 <TITLE>Mac の状態機械ダイアログ</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 <!--The Mac State Machine Dialog-->
16 Mac 状態機械ダイアログ
17 </H1>
18 <P>
19 <IMG src="../../_images/statemachine-context.png" WIDTH="490" HEIGHT="599" ALIGN="Right"><!--The
20 mac uses state machines where opentype would use a contextual lookup. The
21 example at right (with appropriate substitutions attached to it) will convert
22 an initial or medial short-s into a long-s (for doing renaissance printing). -->
23 OpenType では文脈依存の参照を用いているのに対し、Mac では状態機械を用いています。右に示す例 は (それに付随する適切な置換と組み合わさって) 単語の先頭または中間にある短い s を (ルネッサンス調の印刷を行うために) 長い s に置換します。
24 <P>
25 <!--
26 FontForge currently supports 4 types of state machines: contextual glyph
27 substitution, indic rearrangement, contextual glyph insertion, and contextual
28 kerning. The example at right is of contextual glyph substitution. -->
29 FontForge は現在 4 つのタイプの状態機械をサポートしています: 文脈依存のグリフ置換、インド系文字の再配置、文脈依存のグリフ挿入、そして文脈依存のカーニングです。右に示す例は文脈依存のグリフ置換です。
30 <P>
31 <!--
32 State machines have certain similar features. All but kerning be assigned
33 to a
34 <A HREF="http://developer.apple.com/fonts/Registry/index.html">feature/setting</A>
35 combination, they all have a set of flags indicating in what circumstances
36 they apply, they all have the glyphs of the font assigned to a set of classes,
37 and finally they all have a series of transitions indicating how each state
38 behaves when given input from the specified class.
39 状態機械にはいくつかの同様な機能があります。カーニング以外のすべてのタイプには<A HREF="http://developer.apple.com/fonts/Registry/index.html">機能/設定</A>の組合せが割り当てられています。また、どのタイプの機能にも、いかなる状況下でそれを適用すべきかを示すフラグのセットと、一連のクラスに割り当てられたフォントのグリフと、そして、各状態が各所定のクラスから入力が与えられた場合にどのように振舞うかを示す一連の状態遷移とが含まれています。
40 <P>
41 <!--
42 An example conditional substitution state machine is provided in the
43 <A HREF="editexample6-5.html#Apple">tutorial</A>. -->
44 条件つき置換を行う状態機械の例が<A HREF="editexample6-5.html#Apple">チュートリアル</A>にあります。
45 <P>
46 <!--
47 On the mac there are four predefined classes, one meaning the end of input,
48 one for all glyphs not specified elsewhere, one for the magic "deleted" glyph
49 (Apple does not always delete a glyph when asked to do so, instead it retains
50 a special mark in the glyph stream indicating that the glyph should be deleted
51 later), and finally a class for the end of a line of text. Any classes after
52 this are user defined. In the example at right there is one user defined
53 class and it contains the letters in the latin alphabet. Any other glyphs
54 in the font (the digits for example) will automatically be assigned to class
55 1 ("{Everything Else}"). -->
56 Mac では 4 個の定義済みクラスが存在します。1 個は入力の終わりを意味するもので、1 個は他のどこでも指定しないグリフに対応し、1 個は特別な“deleted”グリフ (Apple 式では、削除を指示したばあい、常に即座に削除するのではなく、そのグリフを後で削除することを指定する特殊な印をグリフストリーム内に保持することがあります) に該当し、最後のクラスはテキスト行の末尾に対応するものです。これら 4 つに続く任意のクラスはユーザが定義したものです。
57 <P>
58 <!--
59 The state machine itself is shown as a two dimensional matrix of transition,
60 one transition for every state and class. Classes are shown at the top of
61 the matrix, and states down the side. The transition from state 0 when given
62 input from class 0 is shown in the upper left corner of the matrix, and so
63 on. -->
64 状態機械そのものは、各状態とクラスの対に対して 1 個の状態遷移が対応するような、状態遷移の 2 次元行列として表示されます。クラスは行列の上に表示され、状態は横に縦書きで表示されます。クラス 0 に含まれる入力が与えられた時の状態 0 からの遷移が左上にあり、他の要素も同様です。
65 <P>
66 <!--
67 When the state machine starts up it will be in one of the first two states.
68 It will be in state 0 at the beginning of input, and in state1 when it starts
69 at the beginning of a new line. -->
70 状態機械の開始時には、最初の 2 個の状態のどちらかをとっています。入力の最初では状態 0 となり、新しい行が開始された時には状態1 となります。
71 <P>
72 <!--
73 The <A NAME="transitions">transitions</A> look slightly differently depending
74 on the type of state machine: -->
75 <A NAME="transitions">状態遷移</A>の表示は、状態機械のタイプによりわずかに違いがあります:
76 <TABLE BORDER CELLPADDING="2">
77 <TR>
78 <!--<TH>Indic</TH>-->
79 <TH>インド系</TH>
80 <!--<TH>Contextual</TH>-->
81 <TH>文脈依存</TH>
82 <!--<TH>Insertion</TH>-->
83 <TH>挿入</TH>
84 <!--<TH>Kerning</TH>-->
85 <TH>カーニング</TH>
86 </TR>
87 <TR>
88 <TD><P ALIGN=Center>
89 <IMG src="../../_images/transition-indic.png" WIDTH="54" HEIGHT="64"></TD>
90 <TD><P ALIGN=Center>
91 <IMG src="../../_images/transition-context.png" WIDTH="54" HEIGHT="64"></TD>
92 <TD><P ALIGN=Center>
93 <IMG src="../../_images/transition-insert.png" WIDTH="54" HEIGHT="64"></TD>
94 <TD><P ALIGN=Center>
95 <IMG src="../../_images/transition-kern.png" WIDTH="54" HEIGHT="64"></TD>
96 </TR>
97 </TABLE>
98 <P>
99 <!--
100 The first line of all transitions shows the next state. The next line contains
101 a set of flags where "M" =&gt; the current glyph should be marked (the meaning
102 of this becomes apparent later), "A" =&gt; processing should advance to the
103 next glyph. For indic tables there is a third flag shown, "L" =&gt; the current
104 glyph is the last glyph of the indic rearrangement, while for kerning tables
105 there is a "P" flag indicating that the current glyph should be pushed onto
106 the kerning stack. -->
107 どの状態遷移でも、最初の行は次に移る状態を表します。次の行はフラグの集まりで、意味は以下の通りです:“M”⇒現在の文字に印づけがされる (この意味は後で説明します)、“A”⇒処理は次のグリフに進む。インド系のテーブルでは 3 番目のフラグがあります:“L”⇒現在のグリフはインド系文字の再配置の最後のグリフである。カーニングテーブルでは、現在のグリフをカーニングスタックに積むことを表す“P”フラグが存在します。
108 <P>
109 <!--
110 The last two lines have varied meanings depending on the type of the state
111 machine. -->
112 最後の 2 行は状態機械の種類によってさまざまに異なる意味をもちます。
113 <UL>
114 <LI>
115 <!--For Indic transitions the two lines should be appended to get the indic
116 rearrangement verb (in the example above that would be "Ax =&gt; xA" meaning
117 that the first glyph marked should be moved after the last glyph marked) -->
118 インド系の状態遷移では、この 2 行はインド系再配置動詞を得るために追加されます (上の例は“Ax ⇒ xA”という表示で、印づけされた最初のグリフが印づけされた最後のグリフの後に移動するという意味です)。
119 <LI>
120 <!--For contextual transitions the two lines specify the names (as 4 character
121 tags) of nested substitutions. The first one is applied to the last glyph
122 marked and the second one to the current glyph (if a line is blank, no
123 substitution is applied to that glyph here).<BR> -->
124 文脈依存の状態遷移ではこの 2 行は、入れ子になった置換の (4 文字のタグによる) 名前を指定します。最初の置換は印づけされた最後のグリフに適用され、2 番目は現在のグリフに適用されます (ある行が空である場合は、ここにあるグリフには置換は適用されません)<BR>
125 <!--If a transition has both a "marked substitution" and the "mark current glyph"
126 flag, I believe the substitution applies to the glyph that was previously
127 marked, and not to the current glyph. (Apple doesn't document
128 this)<FONT COLOR="Red"><BR> -->
129 ある状態遷移が“印つき置換”と“現在のグリフに印をつける”フラグの両方をもっていた場合、現在のグリフではなく、前回印づけされたグリフに置換が適用されるのだと私は解釈しています。(Apple の文書にはこれに関する記述がありません)<BR>
130 <FONT COLOR="Red">
131 <!--<STRONG>Caveat: </STRONG></FONT>Apple's 'mort' format was not designed to
132 allow fonteditors to figure out what a state machine did. FontForge can usually
133 make a good guess of what substitutions do which apply to the current glyph,
134 but it will often include extraneous glyph substitutions when a substitution
135 applies to a marked glyph. These should not be harmful (they should never
136 get invoked) but they are annoying ('morx' tables should not have this problem). -->
137 <STRONG>警告: </STRONG></FONT>Apple の&lsquo;mort&rsquo;フォーマットは、状態機械が何を行ったかをフォントエディタが表示できるように設計されていません。FontForge は多くの場合は現在のグリフにどの置換が適用されるかをうまく推測できますが、マークつきグリフに置換が適用される場合は余分なグリフ置換が含まれることがしばしばあります。これらは有害ではありません (それらが起動されることは決してありません) が、煩わしい余計物ではあります (&lsquo;morx&rsquo;テーブルにはこのような問題は無いはずです)。
138 <LI>
139 <!--For insertion transitions the lines specify the glyphs that are to be inserted.
140 The first line applies to the marked glyph, the second line to current glyph
141 (there may not be room enough to show all the inserted glyphs, in which case
142 the glyph list is truncated). There are additional flags here that are also
143 not shown because of lack of room. They may be viewed by clicking on a
144 transition. -->
145 挿入タイプの状態遷移においては、各行は挿入されるグリフを指定します。最初の行はマークつきグリフに適用され、2 行目は現在のグリフに適用されます (挿入される文字をすべて表示する場所が無い場合は、表示は途中で切り詰められます)。場所の不足似より表示できない追加フラグもここには含まれています。それらは、状態遷移のマスをクリックすると表示されます。
146 <LI>
147 <!--For kerning transitions the first line shows the first (few) kerning values,
148 the second line shows either "..." if there are more kerning values, or
149 nothing.<BR> -->
150 カーニングの状態遷移においては、最初の行が最初の (2, 3 の) カーニング値を表し、2 行目は、表示しきれないカーニング値があることを示す“...”か、何も表示しないかのどちらかです。<BR>
151 <!--Note: The number of kerning values
152 <FONT COLOR="Red"><STRONG>MUST</STRONG></FONT> match the number of glyphs
153 pushed on the kern stack, or your application crashes. -->
154 注意: カーニング値の個数はカーニングスタックに置かれたグリフの個数と一致<FONT COLOR="Red"><STRONG>しなければなりません</STRONG></FONT>。さもないとアプリケーションがクラッシュします。
155 </UL>
156 <P>
157 <!--
158 For a complete description of what these state machines can do you should
159 read Apple's documentation -->
160 これらの状態機械が何を行うかに関するより完全な説明については、Apple の文書を読む必要があります。
161 <UL>
162 <LI>
163 <!--On the-->
164 <!--<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6morx.html">'morx'</A>
165 and
166 <A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6mort.html">'mort'</A>
167 tables -->
168 &lsquo;<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6morx.html">morx</A>&rsquo;および&lsquo;<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6mort.html">mort</A>&rsquo;テーブルについて
169 <LI>
170 <!--On the
171 <A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6kern.html">'kern'</A>
172 table (format 1) -->
173 &lsquo;<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6kern.html">kern</A>&rsquo;テーブル (フォーマット 1) について
174 <LI>
175 <!--<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6Tables.html#StateTables">On
176 state machines in general</A> -->
177 <A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6Tables.html#StateTables">状態遷移機械に関する一般論</A>
178 <LI>
179 <!--<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6feat.html">The
180 'feat' (feature) table</A> -->
181 <A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6feat.html">&lsquo;feat&rsquo;(機能) テーブル</A>
182 <LI>
183 <!--<A HREF="http://developer.apple.com/fonts/Registry/index.html">Apple's Font
184 Feature registry</A>-->
185 <A HREF="http://developer.apple.com/fonts/Registry/index.html">Apple のフォント機能登録簿</A>
186 </UL>
187 <P>
188 <!--
189 The general idea is that a word processor converts text into a string of
190 glyphs, and then the state machine is applied to that string. The state machine
191 starts in state 0 or 1, it figures out what class the first glyph belongs
192 to, and indexes into the current state by that class. The transition at that
193 location provides a new state to move to (which might be the same as the
194 current one), it will usually advance to the next glyph (so the new state
195 will be indexed by a different glyph) but sometimes you will want to continue
196 processing the current glyph in the new state. Also it will perform a set
197 of operations which differ depending on the type of state machine. -->
198 一般的な考えは、ワードプロセッサがテキストをグリフの列に変換し、それから状態機械がそのグリフ列に適用されるというものです。状態機械は状態 0 または 1 から始まり、最初のグリフがどのクラスに属するかを調べ、現在の状態に置けるそのクラスのインデックスを調べます。その位置における状態遷移は移動すべき新しい状態 (現在の物と同じ場合もあります) を明らかにし、通常は次のグリフに移行します (それにより、新しい状態では異なるグリフのインデックスづけが行われます) が、場合によっては新しい状態で引き続き現在のグリフの処理が行われることもあります。また、状態機械のタイプによって異なる一連の操作も同時に実行されます。
199 <P>
200 <!--
201 Many of the state machines have the concept of a "marked" glyph. This is
202 important if the desired change for a given glyph depends on what glyphs
203 follow it. In that case when we reach an interesting glyph we "mark" it,
204 and then, after reading a few more glyphs when we know what to do, we apply
205 a transformation to the marked glyph. -->
206 状態機械の多くは“印づけされた”グリフの概念をもっています。これは、与えられたグリフに対する望ましい変更が、その後ろに来るグリフによって異なる場合に重要な意味をもちます。そのような場合、興味深いグリフにたどり着いたときにそれに“印づけ”を行い、その後、2, 3 の追加のグリフを読んで、何を行うべきかが判明した後に、マークづけしたグリフに変換を適用します。
207 <TABLE BORDER CELLPADDING="2">
208 <TR>
209 <!--<TH>Indic</TH>-->
210 <TH>インド系</TH>
211 <!--<TH>Contextual</TH>-->
212 <TH>文脈依存</TH>
213 <!--<TH>Insertion</TH>-->
214 <TH>挿入</TH>
215 <!--<TH>Kerning</TH>-->
216 <TH>カーニング</TH>
217 </TR>
218 <TR VALIGN="Top">
219 <TD><P ALIGN=Left>
220 <!-- In addition to a "mark"ed glyph, indic transformations also have a the concept
221 of a "last" glyph. There are 16 transformations which may be applied the
222 the glyphs between the "mark"ed and "last" glyphs. Suppose the glyph stream
223 looks like<BR>
224 &nbsp; &nbsp; abcdef<BR>
225 And "a" was "mark"ed and "d" was "last" then a transition "AxD =&gt; DxA"
226 refers to the marked glyph as "A", the last glyph as "D" and everything in
227 between as "x", so this would change the glyph stream to<BR>
228 &nbsp; &nbsp; dbcaef</TD> -->
229 “印づけ”されたグリフの他に、インド系の変換においては“最後”のグリフという概念があります。“印づけ”されたグリフと“最後”のグリフの間に適用可能な変換が 16 種類あります。<BR>
230 &nbsp; &nbsp; abcdef<BR>
231 のようなグリフストリームを考えてみましょう。ここで“a”が“印づけ”された文字で、“d”が“最後”の文字であるとすると、状態遷移“AxD ⇒ DxA”は印づけられたグリフを“A”、最後のグリフを“D”、そしてその間のすべての文字を“x”として参照するので、これによりグリフストリームは<BR>
232 &nbsp; &nbsp; dbcaef<BR>
233 に変更されます。</TD>
234 <!--<TD>This can apply a substitution to the current glyph, a different substitution
235 to the marked glyph, and it may mark the current glyph. The substitutions
236 are indicated by 4 character tags and should be "Nested" substitutions which
237 may be created by the Element-&gt;Char Info dialog.</TD> -->
238 <TD>この機能は現在のグリフへの置換と、印づけされたグリフに対する別の置換をを適用することができ、また、現在のグリフに印づけを行うことができます。置換は 4 文字のタグによって表され、<CODE>エレメント(<U>L</U>)→グリフ情報(<U>I</U>)...</CODE> ダイアログで作成することが可能な“入れ子の”置換でなければなりません。
239 <!--<TD>This can insert a string (up to 31 glyphs) before or after the current
240 and the marked glyphs.</TD> -->
241 <TD>この機能は (31 個までののグリフからなる) 文字列を現在のグリフおよびマークづけされたグリフの前後に挿入することができます。</TD>
242 <!--<TD>Kerning does not have a single "mark"ed glyph, instead it can push up
243 to 8 glyphs onto a stack, and at a later point a set of kerning values may
244 be applied to those glyphs (so the flag which is usually indicated as "M"
245 for mark, is here "P" for push). Once all the glyphs have been pushed, a
246 set of kerning values may be applied. One value for each pushed glyph. This
247 is a number which indicates how much the glyph in question should be kerned.
248 If the glyph stream looks like:<BR>
249 &nbsp; &nbsp; F."<BR>
250 and you want to kern "." by -300, and """ by 0 em-units, then you would
251 enter<BR>
252 &nbsp; &nbsp; -300 0<BR>
253 as kerning values.</TD> -->
254 <TD>カーニングでは 1 個の“印づけ”されたグリフは存在せず、その代わりにスタックに 8 個までのグリフを積んでおいて、それらのグリフに適用される一連のカーニング値を後で指定する個とができます (そのため、他の機能で印を表すフラグは“Mark”の頭文字“M”であるのに対し、この機能では“Push”の頭文字“P”となっています)。いちどすべてのグリフを積んだ後で、一連のカーニング値を適用することができます。スタックに積んだ各グリフごとに値 1 個が対応します。これは、いくつのグリフがカーニングを施されるかを示す数値です。
255 例えば、グリフストリームが<BR>
256 &nbsp; &nbsp; F."<BR>
257 であったとして、“.”を -300,“"”を 0 em ユニットだけカーニングしたい場合、カーニング値を<BR>
258 &nbsp; &nbsp; -300 0<BR>
259 と指定することになります。
260 </TR>
261 </TABLE>
262 <H2>
263 <!--Editing <A NAME="EditTransition">Transitions</A>-->
264 <A NAME="EditTransition">状態遷移</A>の編集方法
265 </H2>
266 <P>
267 <!--
268 To edit a transition, simply click on it and a dialog will pop up, appropriate
269 to the type of state machine. -->
270 状態遷移を編集するには、その上で単にクリックすると、その状態機械のタイプに合わせたダイアログが起動します。
271 <TABLE BORDER CELLPADDING="2">
272 <TR>
273 <!--<TH>Indic</TH>-->
274 <TH>インド系</TH>
275 <!--<TH>Contextual</TH>-->
276 <TH>文脈依存</TH>
277 <!--<TH>Insertion</TH>-->
278 <TH>挿入</TH>
279 <!--<TH>Kerning</TH>-->
280 <TH>カーニング</TH>
281 </TR>
282 <TR>
283 <TD><P ALIGN=Center>
284 <IMG src="../../_images/edittransition-indic.png" WIDTH="282" HEIGHT="431"></TD>
285 <TD><P ALIGN=Center>
286 <IMG src="../../_images/edittransition-context.png" WIDTH="282" HEIGHT="431"></TD>
287 <TD><P ALIGN=Center>
288 <IMG src="../../_images/edittransition-insert.png" WIDTH="282" HEIGHT="431"></TD>
289 <TD><P ALIGN=Center>
290 <IMG src="../../_images/edittransition-kern.png" WIDTH="282" HEIGHT="431"></TD>
291 </TR>
292 </TABLE>
293 <P>
294 <!--
295 See <A HREF="statemachine.html#transitions">above</A> for a description of
296 what the fields mean. -->
297 各フィールドの意味の説明は、<A HREF="statemachine.html#transitions">前述</A>の記載を参照してください。
298 <P>
299 <!--
300 If you wish to add a new state, simply edit a transition so that its next
301 state field is the state number desired. FontForge will automatically create
302 the state for you. -->
303 新しい状態を追加したい場合、次状態のフィールドに必要な状態番号を入力してください。FontForge は必要な状態欄を自動的に追加します。
304 <H2>
305 <!--<A NAME="EditClass">Classes</A>-->
306 <A NAME="EditClass">クラス</A>
307 </H2>
308 <P>
309 <!--
310 <IMG SRC="statemachine-class.png" WIDTH="490" HEIGHT="587" ALT="Adding a class to the state machine dialog"
311 ALIGN="Right">If you wish to add a new class press the [New] button under
312 the list of classes. If you wish to edit a class double click on that class.
313 The dialog should change to be like the one at right. The text field contains
314 a list of the names of the glyphs in this class. Pressing the [Set] button
315 will set that field to any selected glyphs in the font view. Pressing the
316 [Select] button will change the selection in the font view to match the glyphs
317 in the text.<BR Clear=ALL> -->
318 <IMG src="../../_images/statemachine-class.png" WIDTH="490" HEIGHT="587" ALT="「状態マシンへのクラス追加」ダイアログ" ALIGN="RIGHT">
319 新しいクラスを追加したいときは、ダイアログの下の <CODE>[新規(<U>N</U>)]</CODE> ボタンを押してください。クラスを編集したい場合は、そのクラスをダブルクリックしてください。ダイアログの表示が右に示したように変更されるはずです。テキストフィールドには、個のクラスに属するグリフ名のリストが含まれています。<CODE>[セット]</CODE> ボタンを押すとフォントビュー内で選択中のすべての文字からなるリストに変更されます。<CODE>[選択]</CODE> ボタンを押すとフォントビュー内の選択文字がテキストフィールド内のグリフと一致するように変更されます。<BR Clear=ALL>
320 <P>
321 <P ALIGN=Center>
322 — <A HREF="fontinfo.html">上</A> — <A HREF="overview.html">目次</A> —
323 </DIV>
324 </BODY></HTML>