1 /* -*- coding: euc-jp; -*- */
2 /***en @page m17nDBFormat Data format of the m17n database
4 This section describes formats of these data supplied by the m17n
8 <li> @ref mdbGeneral "General" -- General Format
9 <li> @ref mdbCharsetList "CharsetList" -- List of character set definitions
10 <li> @ref mdbCodingList "CodingList" -- List of coding system definitions
11 <li> @ref mdbDir "Dir" -- List of data in a database directory.
12 <li> @ref mdbFLT "FLT" -- Font Layout Table
13 <li> @ref mdbFontEncoding "FontEncoding" -- Font Encoding
14 <li> @ref mdbFontSize "FontSize" -- Font Size
15 <li> @ref mdbFontset "Fontset" -- Fontset
16 <li> @ref mdbIM "IM" -- Input Method
19 /***ja @page m17nDBFormat M17N ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¡¼¥¿¡¦¥Õ¥©¡¼¥Þ¥Ã¥È
21 ¤³¤³¤Ç¤Ï¡¢M17N ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÇÄ󶡤µ¤ì¤ë³Æ¥Ç¡¼¥¿¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò²òÀ⤹
25 <li> @ref mdbGeneral "General" -- °ìÈÌŪ¤Ê¥Õ¥©¡¼¥Þ¥Ã¥È
26 <li> @ref mdbCharsetList "CharsetList" -- ʸ»ú¥»¥Ã¥ÈÄêµÁ¤Î¥ê¥¹¥È
27 <li> @ref mdbCodingList "CodingList" -- ¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È
28 <li> @ref mdbDir "Dir" -- ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¥Ç¡¼¥¿¤Î¥ê¥¹¥È
29 <li> @ref mdbFLT "FLT" -- ¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë
30 <li> @ref mdbFontEncoding "FontEncoding" -- ¥Õ¥©¥ó¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°
31 <li> @ref mdbFontSize "FontSize" -- ¥Õ¥©¥ó¥È¥µ¥¤¥º
32 <li> @ref mdbFontset "Fontset" -- ¥Õ¥©¥ó¥È¥»¥Ã¥È
33 <li> @ref mdbIM "IM" -- ¥¤¥ó¥×¥Ã¥È¥á¥½¥Ã¥É
38 @section mdbGeneral °ìÈÌŪ¤Ê¥Õ¥©¡¼¥Þ¥Ã¥È
40 @subsection general-description ÀâÌÀ
42 ´Ø¿ô mdatabase_load () ¤Ï¡¢Âè°ì¥¿¥°¤¬ @c Mchartable ¤« @c Mcharset ¤Ç
43 ¤Ê¤¤¸Â¤ê¡¢¥¿¥°¤Ç»ØÄꤵ¤ì¤¿¥Ç¡¼¥¿¤ò¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î·Á¤ÇÊÖ¤¹¡£ÊÖ¤µ¤ì¤ë
44 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥¡¼¤Ï<tt>Minteger</tt>, <tt>Msymbol</tt>,
45 <tt>Mtext</tt>, <tt>Mplist</tt> ¤Ë¸Â¤ë¡£Ãͤη¿¤Ï¥¡¼¤Ë¤è¤Ã¤ÆÛ£ËæÀ¤Ê¤¯
46 ·èÄꤵ¤ì¤ë¡£¥¡¼¤¬ <tt>Minteger</tt> ¤Ê¤é¤ÐÃͤÏÀ°¿ôÃͤǤ¢¤ê¡¢¥¡¼¤¬
47 <tt>Msymbol</tt> ¤Ê¤éÃͤϥ·¥ó¥Ü¥ë¡¢<tt>Mtext</tt> ¤Ê¤é¤Ð M-text¡¢
48 <tt>Mplist</tt> ¤Ê¤é¤Ð¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ë¡£
50 ¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ò¼¨¤¹¤¿¤á¤Ë¤Ï¤µ¤Þ¤¶¤Þ¤Êɽ¸½·Á¼°¤¬²Äǽ¤Ç¤¢¤ë¡£¤¿¤È¤¨¤Ð
51 <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> ¤È¤¤¤¦·Á¤Ç¡¢ºÇ½é¤ÎK1 ¤È V1¡¢Æó¤ÄÌÜ
52 ¤Î¥¡¼¤ÈÃͤ¬K2 ¤È V2 ¤È¤¤¤Ã¤¿¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤òɽ¸½¤¹¤ë¤³¤È¤â¤Ç¤¤ë¡£
53 ¤·¤«¤·¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÇÍѤ¤¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥¿¥¤¥×¤Ï¤«¤Ê¤ê
54 ¸ÂÄꤵ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¤â¤Ã¤Èñ½ã¤Êɽ¸½·Á¼°¤òÍѤ¤¤ë¤³¤È¤¬¤Ç¤¤ë¡£
56 ¤³¤ì°Ê¹ß¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¼¨¤¹¤¿¤á¤Ë¤Ï S ¼°¤ËÎà»÷¤·¤¿É½¸½¤òÍѤ¤¤ë¡£
57 (¼ÂºÝ m17n ¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¥í¡¼¥À¤Ï¤³¤Îɽ¸½¤Ç½ñ¤«
58 ¤ì¤¿¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤òÆɤà¤è¤¦¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£)
60 ¤³¤Îɽ¸½·Á¼°¤Ï 1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i>Í×ÁÇ (element)</i> ¤«¤é¤Ê¤ë¡£¸Ä¡¹
61 ¤ÎÍ×ÁǤϥץí¥Ñ¥Æ¥£¤¹¤Ê¤ï¤Á¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î°ì¤Ä¤ÎÍ×ÁǤòɽ¤¹¡£
63 Í×ÁÇ´Ö¤Ï 1 ¤Ê¤¤¤·¤½¤ì°Ê¾å¤Î <i> ¶õÇò (whitespace)</i> ¤¹¤Ê¤ï¤Á¥¹¥Ú¡¼¥¹
64 (code 32)¡¢¥¿¥Ö (code 9)¡¢²þ¹Ô (code 10) ¤Î¤¤¤º¤ì¤«¤Ç¶èÀÚ¤é¤ì¤ë¡£¥»¥ß
65 ¥³¥í¥ó(<tt>;</tt>) ¤Ç»Ï¤Þ¤ë¹Ô¤Ï¥³¥á¥ó¥È¤Ç¤¢¤ë¡£
67 ³Æ¥×¥í¥Ñ¥Æ¥£¤Î¥¡¼¤ÈÃͤϡ¢Í×ÁǤΥ¿¥¤¥×¤Ë´ð¤Å¤¤¤Æ°Ê²¼¤Î¤è¤¦¤Ë·èÄꤵ¤ì¤ë¡£
73 Àµµ¬É½¸½<tt>-?[0-9]+</tt> ¤Þ¤¿¤Ï<tt>0[xX][0-9A-Fa-f]+</tt> ¤Ë¹çÃפ¹¤ë
74 Í×ÁǤϡ¢¥¡¼¤¬<tt>Minteger</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£ºÇ½é¤ÎÀµµ¬É½¸½
75 ¤È¹çÃפ¹¤ë¤â¤Î¤Ï 10 ¿Ê¤ÎÀ°¿ô¡¢¸å¤ÎÀµµ¬É½¸½¤È¹çÃפ¹¤ë¤â¤Î¤Ï 16 ¿Ê¤ÎÀ°¿ô
76 ¤È²ò¼á¤·¡¢¤½¤Î²ò¼á¤Î·ë²Ì¤¬¥×¥í¥Ñ¥Æ¥£¤ÎÃͤǤ¢¤ë¡£
78 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>0xA0</tt> ¤Ï10 ¿Ê¤Ç 160 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
82 Àµµ¬É½¸½<tt>[^-0-9(]([^\\()]|\\.)+</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥¡¼¤¬<tt>
83 Msymbol</tt>¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£Í×ÁÇÃæ¤Î <tt>\\t</tt>,
84 <tt>\\n</tt>, <tt>\\r</tt>, <tt>\\e</tt> ¤Ï¤½¤ì¤¾¤ì¡¢¥¿¥Ö (code 9)¡¢²þ
85 ¹Ô (code 10)¡¢Éüµ¢(code 13)¡¢¥¨¥¹¥±¡¼¥× (code 27) ¤ËÃÖ¤´¹¤¨¤é¤ì¤ë¡£¥Ð¥Ã
86 ¥¯¥¹¥é¥Ã¥·¥å¤Ë³¤¯Â¾¤Îʸ»ú¤Ï¤½¤ì¼«¿È¤È²ò¼á¤µ¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢·ë
87 ²Ì¤È¤·¤ÆÆÀ¤é¤ì¤ëʸ»úÎó¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
89 ¤¿¤È¤¨¤Ð¡¢Í×ÁÇ <tt>abc\ def</tt> ¤Ï "abc def" ¤ò̾Á°¤È¤·¤Æ»ý¤Ä¥·¥ó¥Ü¥ë
90 ¤òÃͤȤ¹¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
94 Àµµ¬É½¸½ <tt>"([^"]|\\")*"</tt> ¤Ë¹çÃפ¹¤ëÍ×ÁǤϡ¢¥¡¼ <tt>Mtext</tt>
95 ¤Ç¤¢¤ë¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£¾åµ¤Î¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¤Ë¤è¤ë¥¨¥¹¥±¡¼¥×¤Ï¤³¤³¤Ç
96 ¤â͸ú¤Ç¤¢¤ë¡£¤µ¤é¤Ë¡¢Í×ÁÇÃæ¤ÎÀµµ¬É½¸½
97 <tt>\\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> ¤Ë¹çÃפ¹¤ëÉôʬ¤Ï¡¢16¿Ê¤Ç²ò¼á¤·¤¿
98 ·ë²Ì¤ËÃÖ¤´¹¤¨¤é¤ì¤ë¡£
100 ¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å¥¨¥¹¥±¡¼¥×¤ò½èÍý¤·¤¿¾å¤Ç¡¢¥À¥Ö¥ë¥¯¥ª¡¼¥È¤Ë¤Ï¤µ¤Þ¤ì¤¿¥Ð
101 ¥¤¥ÈÎó¤òUTF-8 Îó¤È¤·¤Æ²ò¼á¤·¡¢M-text ¤Ë¥Ç¥³¡¼¥É¤¹¤ë¡£¤³¤Î M-text ¤¬¥×
106 Âбþ¤¹¤ë³ç¸Ì¤Ë¤Ï¤µ¤Þ¤ì¤¿ 0 ¸Ä°Ê¾å¤ÎÍ×ÁǤÏ<tt>Mplist</tt> ¤ò¥¡¼¤È¤¹¤ë
107 ¥×¥í¥Ñ¥Æ¥£¤ò¼¨¤¹¡£³ç¸Ì¤ÎÁ°¸å¤Î¶õÇò¤Ï¼è¤ê½ü¤«¤ì¤ë¡£¥×¥í¥Ñ¥Æ¥£¤ÎÃͤϡ¢¥×
108 ¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Ç¤¢¤ê¡¢¤½¤Î³ç¸ÌÆâ¤Î³ÆÍ×ÁǤòºÆµ¢Åª¤Ë²ò¼á¤·¤¿·ë²Ì¤Ç¤¢¤ë¡£
112 @subsection general-syntax ʸˡ¤Îɽµ
114 ¥Ç¡¼¥¿¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¥Õ¥©¡¼¥Þ¥Ã¥È¤ÎÀâÌÀ¤Ç¤Ï¡¢BNFÉ÷¤ÎµË¡¤¬ÍѤ¤¤é¤ì
115 ¤ë¡£¤³¤ÎµË¡¤Ç¤Ï¡¢Èó½ªÃ¼¤ÏÂçʸ»ú¡Ê´Ö¤Ë'-'¤¬Æþ¤Ã¤Æ¤â¤è¤¤¡Ë ¤Ç¡¢½ªÃ¼¤Ï "
116 ¤Ç°Ï¤Ã¤Æɽ¤µ¤ì¤ë¡£ÆÃÊ̤ÊÈó½ªÃ¼ INTEGER, SYMBOL,
117 MTEXT, PLIST ¤Ï¤½¤ì¤¾¤ìÂбþ¤¹¤ë¥×¥í¥Ñ¥Æ¥£¤ò°ÕÌ£¤¹¤ë¡£
119 @subsection general-example Îã
121 ¼¡¤Îñ½ã¤Ê·Á¼°¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤ËÆɤ߹þ¤Þ¤ì¤ë¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Ç¡¼¥¿¤Î
126 [ INTEGER | SYMBOL | MTEXT | FUNC ] *
129 '(' FUNC-NAME FUNC-ARG * ')'
135 INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')'
138 ¤¿¤È¤¨¤Ð¡¢¼¡¤Î¥Æ¥¥¹¥È¤ò´Þ¤à¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Ï¾å¤Îʸˡ¤Ë¹çÃפ¹¤ë¡§
141 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
144 ¤½¤·¤Æ¼¡¤Î¤è¤¦¤Ê¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤ÆÆɤ߹þ¤Þ¤ì¤ë¡§
147 Â裱Í×ÁÇ: ¥¡¼: Msymbol, ÃÍ: abc
148 Â裲Í×ÁÇ: ¥¡¼: Minteger, ÃÍ: 123
149 Â裳Í×ÁÇ: ¥¡¼: Mplist, ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
150 Â裱Í×ÁÇ: ¥¡¼ Msymbol, ÃÍ: pgr
151 Â裲Í×ÁÇ: ¥¡¼ Minteger, ÃÍ: 255
152 Â裴Í×ÁÇ: ¥¡¼: Mtext, ÃÍ: m"text
153 Â裵Í×ÁÇ: ¥¡¼: Mplist, ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
154 Â裱Í×ÁÇ: ¥¡¼: Msymbol, ÃÍ: _\_
155 Â裲Í×ÁÇ: ¥¡¼: Mplist, ÃÍ: ¼¡¤ÎÍ×ÁǤ«¤é¤Ê¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È
156 Â裱Í×ÁÇ: ¥¡¼: Mtext, ÃÍ: string
157 Â裲Í×ÁÇ: ¥¡¼: Msymbol, ÃÍ: xyz
158 Â裳Í×ÁÇ: ¥¡¼: Minteger, ÃÍ: -456
163 @section mdbGeneral General Format
165 @subsection general-description DESCRIPTION
167 The mdatabase_load () function returns the data specified by tags in
168 the form of plist if the first tag is not @c Mchartable nor @c
169 Mcharset. The keys of the returned plist are limited to
170 <tt>Minteger</tt>, <tt>Msymbol</tt>, <tt>Mtext</tt>, and
171 <tt>Mplist</tt>. The type of the value is unambiguously determined by
172 the corresponding key. If the key is <tt>Minteger</tt>, the value is
173 an integer. If the key is <tt>Msymbol</tt>, the value is a symbol.
176 A number of expressions are possible to represent a plist. For
177 instance, we can use the form <tt>(K1:V1, K2:V2, ..., Kn:Vn)</tt> to
178 represent a plist whose first property key and value are K1 and V1,
179 second key and value are K2 and V2, and so on. However, we can use a
180 simpler expression here because the types of plists used in the m17n
181 database are fairly restricted.
183 Hereafter, we use an expression, which is similar to S-expression, to
184 represent a plist. (Actually, the default database loader of the m17n
185 library is designed to read data files written in this expression.)
187 The expression consists of one or more <i>elements</i>. Each element
188 represents a property, i.e. a single element of a plist.
190 Elements are separated by one or more <i>whitespaces</i>, i.e. a space
191 (code 32), a tab (code 9), or a newline (code 10). Comments begin
192 with a semicolon (<tt>;</tt>) and extend to the end of the line.
194 The key and the value of each property are determined based on the
195 type of the element as explained below.
201 An element that matches the regular expression <tt>-?[0-9]+</tt> or
202 <tt>0[xX][0-9A-Fa-f]+</tt> represents a property whose key is
203 <tt>Minteger</tt>. An element matching the former expression is
204 interpreted as an integer in decimal notation, and one matching the
205 latter is interpreted as an integer in hexadecimal notation. The
206 value of the property is the result of interpretation.
208 For instance, the element <tt>0xA0</tt> represents a property whose
209 value is 160 in decimal.
213 An element that matches the regular expression
214 <tt>[^-0-9(]([^\\()]|\\.)+</tt> represents a property whose key is
215 <tt> Msymbol</tt>. In the element, <tt>\\t</tt>, <tt>\\n</tt>,
216 <tt>\\r</tt>, and <tt>\\e</tt> are replaced with tab (code 9), newline
217 (code 10), carriage return (code 13), and escape (code 27)
218 respectively. Other characters following a backslash is interpreted
219 as it is. The value of the property is the symbol having the
220 resulting string as its name.
222 For instance, the element <tt>abc\ def</tt> represents a property
223 whose value is the symbol having the name "abc def".
227 An element that matches the regular expression <tt>"([^"]|\\")*"</tt>
228 represents a property whose key is <tt>Mtext</tt>. The backslash
229 escape explained above also applies here. Moreover, each part in the
230 element matching the regular expression <tt>
231 \\[xX][0-9A-Fa-f][0-9A-Fa-f]</tt> is replaced with its hexadecimal
234 After having resolved the backslash escapes, the byte sequence between
235 the double quotes is interpreted as a UTF-8 sequence and decoded into
236 an M-text. This M-text is the value of the property.
240 Zero or more elements surrounded by a pair of parentheses represent a
241 property whose key is <tt>Mplist</tt>. Whitespaces before and after a
242 parenthesis can be omitted. The value of the property is a plist,
243 which is the result of recursive interpretation of the elements
244 between the parentheses.
248 @subsection general-syntax SYNTAX NOTATION
250 In an explanation of a plist format of data, a BNF-like notation is
251 used. In the notation, non-terminals are represented by a string of
252 uppercase letters (including '-' in the middle), terminals are
253 represented by a string surrounded by '"'. Special non-terminals
254 INTEGER, SYMBOL, MTEXT and PLIST represents property integer, symbol,
255 M-text, or plist respectively.
257 @subsection general-example EXAMPLE
259 Here is an example of database data that is read into a plist of this
264 [ INTEGER | SYMBOL | MTEXT | FUNC ] *
267 '(' FUNC-NAME FUNC-ARG * ')'
273 INTEGER | SYMBOL | MTEXT | '(' FUNC-ARG ')'
276 For instance, a data file that contains this text matches the above
280 abc 123 (pqr 0xff) "m\"text" (_\\_ ("string" xyz) -456)
283 and is read into this plist:
286 1st element: key: Msymbol, value: abc
287 2nd element: key: Minteger, value: 123
288 3rd element: key: Mplist, value: a plist of these elements:
289 1st element: key Msymbol, value: pgr
290 2nd element: key Minteger, value: 255
291 4th element: key: Mtext, value: m"text
292 5th element: key: Mplist, value: a plist of these elements:
293 1st element: key: Msymbol, value: _\_
294 2nd element: key: Mplist, value: a plist of these elements:
295 1st element: key: Mtext, value: string
296 2nd element: key: Msymbol, value: xyz
297 3rd element: key: Minteger, value: -456
302 @section mdbCharsetList ʸ»ú¥»¥Ã¥ÈÄêµÁ¤Î¥ê¥¹¥È
304 @subsection cslist-description ÀâÌÀ
306 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢¥¿¥° \<charset-list\> ¤ò»ý¤Ä¥Ç¡¼¥¿¤«¤éʸ»ú¥»¥Ã¥ÈÄêµÁ
307 ¤Î¥ê¥¹¥È¤ò¥í¡¼¥É¤¹¤ë¡£¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·
311 CHARSET-LIST ::= DEFINITION *
313 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
319 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
322 @c NAME ¤ÏÄêµÁ¤¹¤ëʸ»ú¥»¥Ã¥È¤Î̾Á°¤Ç¤¢¤ë¡£
324 @c KEY ¤È @c VALUE ¤Î¥Ú¥¢¤Ï¡¢´Ø¿ô mchar_define_charset () ¤ËÂ裲°ú¿ô
325 $PLIST ¤ÎÍ×ÁǤȤ·¤ÆÍ¿¤¨¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
327 @subsection cslist-seealso SEE ALSO
329 @ref mdbGeneral "mdbGeneral(5)", mchar_define_charset ()
333 @section mdbCharsetList List of character set definitions
335 @subsection cslist-description DESCRIPTION
337 The m17n library loads a list of charset definitions from the data of
338 tag \<charset-list\>. The data is loaded as a plist of this format.
341 CHARSET-LIST ::= DEFINITION *
343 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
349 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
352 @c NAME is a name of a charset to define.
354 @c KEY and @c VALUE pair is a property given to the function
355 mchar_define_charset () as an element of the second argument $PLIST.
357 @subsection cslist-seealso SEE ALSO
359 @ref mdbGeneral "mdbGeneral(5)", mchar_define_charset ()
363 @section mdbCodingList ¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È
365 @subsection coding-list-description ÀâÌÀ
367 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢½é´ü²½¤ÎºÝ m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥¿¥° \<coding-list\>
368 ¤Î¤Ä¤¤¤¿¥Ç¡¼¥¿¤«¤é¥³¡¼¥É·ÏÄêµÁ¤Î¥ê¥¹¥È¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î
369 ¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
372 CODING-LIST ::= DEFINITION *
374 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
379 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
382 @c NAME ¤ÏÄêµÁ¤¹¤ë¥³¡¼¥É·Ï¤Î̾Á°¤Ç¤¢¤ë¡£
384 @c KEY ¤È @c VALUE ¤Î¥Ú¥¢¤Ï¡¢´Ø¿ô mchar_define_coding () ¤Ë£²ÈÖÌܤΰú
385 ¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤ë¥×¥í¥Ñ¥Æ¥£¤Ç¤¢¤ë¡£
387 @subsection coding-list-seealso »²¾È
389 @ref mdbGeneral "mdbGeneral(5)", mconv_define_coding ()
393 @section mdbCodingList List of coding system definitions
395 @subsection coding-list-description DESCRIPTION
397 The m17n library loads a list of coding system definitions from the
398 m17n database by the tags \<coding-list\> at initialization time. The
399 data is loaded as a plist of this format.
402 CODING-LIST ::= DEFINITION *
404 DEFINITION ::= '(' NAME ( KEY VALUE ) * ')'
409 VALUE ::= SYMBOL | INTEGER | MTEXT | PLIST
412 @c NAME is a name of a coding system to define.
414 @c KEY and @c VALUE pair is a property given to the function
415 mconv_define_coding () as the second argument.
417 @subsection coding-list-seealso SEE ALSO
419 @ref mdbGeneral "mdbGeneral(5)", mconv_define_coding ()
423 @section mdbDir ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¥Ç¡¼¥¿¤Î¥ê¥¹¥È
425 @subsection dir-description ÀâÌÀ
427 m17n ¥é¥¤¥Ö¥é¥ê¤Ï½é´ü²½¤ÎºÝ¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹Ãæ¤Î¥Ç¡¼¥¿ÄêµÁ¤Î¥ê¥¹¥È¤ò
428 ³Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î "mdb.dir" ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤«¤é¥í¡¼
429 ¥É¤¹¤ë¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤ª¤±¤ë¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï°Ê²¼¤Ç¤¢¤ë¡£
432 MDB-DIR ::= DEFINITION *
434 DEFINITION ::= '(' TAG [ TAG [ TAG [ TAG ] ] ] FILE ')'
443 @section mdbDir List of data in a database directory.
445 @subsection dir-description DESCRIPTION
447 The m17n library loads a list of definitions of data of the m17n
448 database from files of name "mdb.dir" in each database directory at
449 initialization time. The plist format of this file is as follows:
452 MDB-DIR ::= DEFINITION *
454 DEFINITION ::= '(' TAG [ TAG [ TAG [ TAG ] ] ] FILE ')'
463 @section mdbFLT ¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë
465 @subsection flt-description ÀâÌÀ
467 ñ½ã¤Ê¥¹¥¯¥ê¥×¥È¤Î¾ì¹ç¡¢É½¼¨¥¨¥ó¥¸¥ó¤ÏÁªÂò¤·¤¿¥Õ¥©¥ó¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó
468 ¥°¤Ë±þ¤¸¤Æʸ»ú¥³¡¼¥É¤ò¥°¥ê¥Õ¥³¡¼¥É¤Ë°ìʸ»ú¤º¤ÄÊÑ´¹¤¹¤ë¡£¤·¤«¤·¡¢Ê£»¨¤Ê
469 ¥ì¥¤¥¢¥¦¥È¤òÍ׵᤹¤ëʸ½ñ¡¢¤¿¤È¤¨¤Ð¥¿¥¤¤ä¥¤¥ó¥É·Ï¤Î¥¹¥¯¥ê¥×¥È¤Ê¤É¤Î¾ì¹ç¡¢
470 £±ÂУ±¤ÎÊÑ´¹¤Ç¤ÏÉÔ½½Ê¬¤Ç¤¢¤ë¡£Ê£¿ô¤Îʸ»ú¤¬°ì¤Ä¤Î¥ê¥¬¥Á¥ã¤È¤·¤ÆÉÁ¤«¤ì¤¿¤ê¡¢
471 £²¼¡¸µÅª¤Ë¤º¤é¤·¤¿°ÌÃÖ¤ËÉÁ¤«¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¥°¥ê¥Õ¤¬¤¢¤Ã¤¿¤ê¤¹¤ë¡£
473 ¤³¤Î¤è¤¦¤ÊÊ£»¨¤Ê¥¹¥¯¥ê¥×¥È¤ò½èÍý¤¹¤ë¤¿¤á¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Ï¥Õ¥©¥ó¥È¥ì
474 ¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë (û½Ì¤·¤Æ FLT ¤È¸Æ¤Ö¤³¤È¤Ë¤¹¤ë) ¤òÍѤ¤¤ë¡£FLT ¥É¥é¥¤
475 ¥Ð¤Ï FLT ¤ò²ò¼á¤·¡¢Ê¸»úÎó¤òɽ¼¨¥¨¥ó¥¸¥ó¤ËÅϤ¹¤³¤È¤Î¤Ç¤¤ë¥°¥ê¥ÕÎó¤ËÊÑ
478 FLT ¤Ï OpenType Layout Table ¤Ë¸«¤é¤ì¤ë¾ðÊó (CMAP, GSUB, and GPOS) ¤Ë
479 ²Ã¤¨¤Æ¡¢Ê¸»úÎ󤫤é½ñµÁÇ (grapheme) ¥¯¥é¥¹¥¿¤òÃê½Ð¤·¤¿¤ê¡¢¥¯¥é¥¹¥¿Æâ¤Ç
480 ʸ»ú¤òʤÙÊѤ¨¤¿¤ê¤¹¤ë¤¿¤á¤Î¾ðÊó¤ò»ý¤Ä¤³¤È¤¬¤Ç¤¤ë¡£
482 FLT ¤Ï 1 ¤Ä°Ê¾å¤ÎÊÑ´¹¥¹¥Æ¡¼¥¸¤¬Â³¤¤¤¿¤â¤Î¤Ç¤¢¤ë¡£³Æ¥¹¥Æ¡¼¥¸¤Ç¥³¡¼¥ÉÎó
483 ¤ÏÊ̤Τâ¤Î¤ËÊÑ´¹¤µ¤ì¡¢¼¡¤Î¥¹¥Æ¡¼¥¸¤ËÆɤޤì¤ë¡£Îó¤ÎŤµ¤Ï¥¹¥Æ¡¼¥¸Ëè¤Ë°Û
484 ¤Ê¤ë¤³¤È¤¬¤¢¤ë¡£¥³¡¼¥ÉÎó¤Î³ÆÍ×ÁǤϰʲ¼¤ÎÀ°¿ôÃͤΰÀ¤ò»ý¤Ä¡£
489 ÊÑ´¹¤ÎºÇ½é¤Î¥¹¥Æ¡¼¥¸¤Ç¤Ï¡¢¸µ¤Îʸ»úÎó¤Îʸ»ú¥³¡¼¥É¡£ºÇ¸å¤Î¥¹¥Æ¡¼¥¸¤Ç¤Ï¡¢
490 ɽ¼¨¥¨¥ó¥¸¥ó¤ËÅϤµ¤ì¤ë¥°¥ê¥Õ¥³¡¼¥É¡£¤½¤ì°Ê³°¤Ç¤ÏÃæ´ÖŪ¤Ê¥°¥ê¥Õ¥³¡¼¥É¡£
494 ¤½¤Î¥¹¥Æ¡¼¥¸¤Î @c CATEGORY-TABLE ¤ÇÄêµÁ¤µ¤ì¤¿¥«¥Æ¥´¥ê¡¼¥³¡¼¥É¡£
498 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤òÁ°¤Î¤â¤Î¤È¤É¤¦·ë¹ç¤¹¤ë¤«¤ò»ØÄꤹ¤ë¡£
500 <li> º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°
502 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢É½¼¨´Ø¿ô¤Ë¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤ÎÁ°¤Ë¥¹¥Ú¡¼¥¹¤òÁÞÆþ¤·¤Æ¡¢Á°
503 ¤Î¥°¥ê¥Õ¤È½Å¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤è¤¦»Ø¼¨¤¹¤ë¡£
505 <li> ±¦¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°
507 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢É½¼¨´Ø¿ô¤Ë¤³¤Î¡ÊÃæ´Ö¡Ë¥°¥ê¥Õ¤Î¸å¤Ë¥¹¥Ú¡¼¥¹¤òÁÞÆþ¤·¤Æ¡¢¸å
508 ¤Î¥°¥ê¥Õ¤È½Å¤Ê¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤è¤¦»Ø¼¨¤¹¤ë¡£
512 ¥ì¥¤¥¢¥¦¥È¥¨¥ó¥¸¥ó¤¬¥Æ¥¥¹¥È¤òÉÁ¤¯ºÝ¤Ë¤Ï¡¢¤Þ¤º¥Æ¥¥¹¥È¤Î³Æʸ»ú¤ËÂФ·¤Æ
513 ¤½¤ì¤¾¤ì¥Õ¥©¥ó¥È¤ÈFLT ¤ò·èÄꤹ¤ë¡£Æ±¤¸¥Õ¥©¥ó¥È¤È FLT ¤òÍѤ¤¤ëÉôʬʸ»ú
514 Îó¤Ë´Ø¤·¤Æ¡¢¥ì¥¤¥¢¥¦¥È¥¨¥ó¥¸¥ó¤ÏÂбþ¤¹¤ëÃæ´ÖŪ¤Ê¥°¥ê¥Õ¤ÎÎó¤òÀ¸À®¤¹¤ë¡£
515 Ãæ´ÖŪ¤Ê¥°¥ê¥Õ¥³¡¼¥É¤Î³ÆÍ×ÁǤϡ¢¥³¡¼¥É¤Î°À¤È¤·¤ÆÂбþ¤¹¤ëʸ»ú¥³¡¼¥É¡¢
516 ¾¤Î°À¤È¤·¤Æ 0 ¤ò»ý¤Ä¡£¤³¤ÎÎó¤ÏFLT ¤ÎºÇ½é¤Î¥¹¥Æ¡¼¥¸¤Ç¸½¹Ô¤Î @e ¥é¥ó
517 (ÉôʬÎó) ¤È¤·¤Æ½èÍý¤µ¤ì¤ë¡£
519 ³Æ¥¹¥Æ¡¼¥¸¤Ï°Ê²¼¤Î¤è¤¦¤ËƯ¤¯¡£
521 ¤Þ¤º¤³¤Î¥¹¥Æ¡¼¥¸¤Ë @c CATEGORY-TABLE ¤¬¤¢¤ì¤Ð¡¢¸½¹Ô¤Î¥é¥ó¤Î¤¹¤Ù¤Æ¤Î¥°
522 ¥ê¥Õ¤Î¥«¥Æ¥´¥ê¤¬¹¹¿·¤µ¤ì¤ë¡£¥«¥Æ¥´¥ê¤Î̵¤¤¥°¥ê¥Õ¤¬¤¢¤ì¤Ð¡¢¥é¥ó¤Ï¤½¤Î¥°
525 ¼¡¤Ë¤³¤Î¥¹¥Æ¡¼¥¸¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¡¢·ë¹çµ¬Â§¡¢º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤¬ 0
528 ¼¡¤¤¤Ç¡¢¤³¤Î¥¹¥Æ¡¼¥¸¤ÎºÇ½é¤ÎÊÑ´¹µ¬Â§¤¬¸½¹Ô¤Î¥é¥ó¤ËŬÍѤµ¤ì¤ë¡£
530 ºÇ¸å¤Ë¸½¹Ô¤Î¥é¥ó¤Ï¿·¤·¤¯ºî¤é¤ì¤¿¡ÊÃæ´Ö¡Ë¥°¥ê¥ÕÎó¤ËÃÖ¤´¹¤¨¤é¤ì¤ë¡£
532 @subsection flt-syntax ʸˡ¤È°ÕÌ£
534 m17n ¥é¥¤¥Ö¥é¥ê ¤Ï m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¥¿¥° \<font, layouter,
535 FLT-NAME\> ¤òÍѤ¤¤Æ FLT ¤ò¥í¡¼¥É¤¹¤ë¡£FLT ¤Î¥Ç¡¼¥¿¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï°Ê²¼¤ÎÄ̤ꡧ
538 FONT-LAYOUT-TABLE ::= STAGE0 STAGE *
540 STAGE0 ::= CATEGORY-TABLE GENERATOR
542 STAGE ::= CATEGORY-TABLE ? GENERATOR
544 CATEGORY-TABLE ::= '(' 'category' CATEGORY-SPEC + ')'
546 CATEGORY-SPEC ::= '(' CODE CATEGORY ')'
547 | '(' CODE CODE CATEGORY ')'
554 @c CATEGORY-SPEC ¤ÎÄêµÁÃæ¤Ç¡¢ @c CODE ¤Ï¥°¥ê¥Õ¥³¡¼¥É @c CATEGORY ¤ÏÂç
555 ʸ»ú¤¢¤ë¤¤¤Ï¾®Ê¸»ú¤Î ASCII code¡¢¤¹¤Ê¤ï¤Á 'A', ... 'Z', 'a', .. 'z' ¤Î
558 @c CATEGORY-SPEC ¤ÎºÇ½é¤Î·Á¼°¤Ï¡¢@c CATEGORY ¤ò¥³¡¼¥É @c CODE ¤ò»ý¤Ä¥°
559 ¥ê¥Õ¤Ë³ä¤êÅö¤Æ¡¢Æó¤ÄÌܤηÁ¼°¤Ï @c CATEGORY ¤òÆó¤Ä¤Î @c CODE ¤Î´Ö¤Î¥³¡¼
560 ¥É¤ò»ý¤Ä¥°¥ê¥Õ¤Ë³ä¤êÅö¤Æ¤ë¡£
563 GENERATOR ::= '(' 'generator' RULE MACRO-DEF * ')'
565 RULE ::= REGEXP-BLOCK | MATCH-BLOCK | SUBST-BLOCK | COND-BLOCK
566 | DIRECT-CODE | COMBINING-SPEC | OTF-SPEC
567 | PREDEFINED-RULE | MACRO-NAME
569 MACOR-DEF ::= '(' MACRO-NAME RULE + ')'
572 ³Æ @c RULE ¤Ï¡¢¾ÃÈñ¤¹¤ë¥°¥ê¥Õ¤ÈÀ¸À®¤¹¤ë¥°¥ê¥Õ¤ò»ØÄꤹ¤ë¡£¡Ö¾ÃÈñ¤µ¤ì¤¿¡×
573 ¥°¥ê¥Õ¤Ï¸½¹Ô¤Î¥é¥ó¤«¤é¼è¤ê½ü¤«¤ì¤ë¡£¥ë¡¼¥ë¤Ï¾õ¶·¤Ë¤è¤Ã¤Æ¤Ï¼ºÇÔ¤¹¤ë¡£ÌÀ
574 ¼¨Åª¤Ë¼ºÇԤȽñ¤«¤ì¤Æ¤¤¤ë¾ì¹ç¤ò¤Î¤¾¤¡¢À®¸ù¤È¤ß¤Ê¤¹¡£
577 DIRECT-CODE ::= INTEGER
580 ¤³¤Î¥ë¡¼¥ë¤Ï¥°¥ê¥Õ¤ò¾ÃÈñ¤»¤º¡¢°Ê²¼¤Î°À¤ò»ý¤Ä¥°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£
583 <li> ¥³¡¼¥É : @c INTEGER ¡Ü ¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È
584 <li> ·ë¹çµ¬Â§ : ¥Ç¥Õ¥©¥ë¥ÈÃÍ
585 <li> º¸¥Ñ¥Ç¥¤¥ó¥°¥Õ¥é¥° : ¥Ç¥Õ¥©¥ë¥ÈÃÍ
586 <li> ±¦¥Ñ¥Ç¥¤¥ó¥°¥Õ¥é¥° : 0
589 ¥°¥ê¥ÕÀ¸À®¸å¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¡¢·ë¹çµ¬Â§, º¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é
590 ¥° ¤Ï¤¹¤Ù¤Æ 0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
593 PREDEFINED-RULE ::= '=' | '*' | '<' | '>' | '|' | '[' | ']'
596 ¤³¤ì¤é¤Ï°Ê²¼¤Î¤è¤¦¤ËƯ¤¯¡£
601 ¸½¹Ô¤Î¥é¥ó¤ÎºÇ½é¤Î¥°¥ê¥Õ¤ò¾ÃÈñ¤·¡¢Æ±¤¸¥°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£¸½¹Ô¤Î¥é¥ó¤¬¶õ
606 Á°¤Î¥ë¡¼¥ë¤ò·«¤êÊÖ¤·¼Â¹Ô¤¹¤ë¡£Á°¤Î¥ë¡¼¥ë¤¬¼ºÇÔ¤¹¤ì¤Ð¡¢²¿¤â¤»¤º¼ºÇÔ¤¹¤ë¡£
610 ½ñµÁÇ¥¯¥é¥¹¥¿¤Î»Ï¤á¤ò¼¨¤¹¡£
614 ½ñµÁÇ¥¯¥é¥¹¥¿¤Î½ª¤ê¤ò¼¨¤¹¡£
618 ¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Îº¸¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤ò 1 ¤Ë¤¹¤ë¡£¥°¥ê¥Õ¤Î¾ÃÈñ¤äÀ¸
623 ¤³¤Îµ¬Â§¤ÏºÇ¶áÀ¸À®¤µ¤ì¤¿¥°¥ê¥Õ¤Î±¦¥Ñ¥Ç¥£¥ó¥°¥Õ¥é¥°¤ò 1 ¤Ë¤¹¤ë¡£¥°¥ê¥Õ
624 ¤Î¾ÃÈñ¤äÀ¸À®¤Ï¤·¤Ê¤¤¡£
628 ¥°¥ê¥Õ¤ò¾ÃÈñ¤»¤º¡¢¥«¥Æ¥´¥ê¤¬ ' ' ¤Ç¾¤Î°À¤¬ 0 ¤Ç¤¢¤ëÆÃÊ̤ʥ°¥ê¥Õ¤òÀ¸
629 À®¤¹¤ë¡£¤³¤Îµ¬Â§¤À¤±¤¬¤³¤ÎÆÃÊ̤ʥ°¥ê¥Õ¤òÀ¸À®¤¹¤ë¡£
634 REGEXP-BLOCK ::= '(' REGEXP RULE * ')'
639 @c MTEXT ¤Ï¸½¹Ô¤Î¥é¥ó¤Î¥«¥Æ¥´¥êÎó¤Ë¹çÃפ¹¤Ù¤Àµµ¬É½¸½¤Ç¤¢¤ë¡£¹çÃפ¹¤ì
640 ¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þŪ¤Ë¸½¹Ô¤Î¥é¥ó¤ò¹çÃפ·¤¿Éôʬ¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c
641 RULE ¤ò¼Â¹Ô¤¹¤ë¡£¹çÃפ·¤¿Éôʬ¤Ï¤³¤Îµ¬Â§¤Ë¤è¤Ã¤Æ¾ÃÈñ¤µ¤ì¤ë¡£
643 ³ç¸Ì¤Î¤Ä¤¤¤¿Éôʬɽ¸½¤¬¤¢¤ì¤Ð¡¢@c RULE ¤ÎÃæ¤Ë½Ð¸½¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤ @c
644 MATCH-BLOCK ¤Ë¤è¤Ã¤Æ»ÈÍѤ¹¤ë¤¿¤á¤ËµÏ¿¤µ¤ì¤ë¡£
646 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
649 MATCH-BLOCK ::= '(' MATCH-INDEX RULE * ')'
651 MATCH-INDEX ::= INTEGER
654 @c MATCH-INDEX ¤ÏľÁ°¤Î @c REGEXP-BLOCK ¤Ë¤è¤Ã¤ÆµÏ¿¤µ¤ì¤¿Éôʬɽ¸½¤ò»Ø
655 Äꤹ¤ëÀ°¿ô¤Ç¤¢¤ë¡£¤³¤Î¤è¤¦¤ÊÉôʬɽ¸½¤¬¤¢¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þŪ¤Ë¸½¹Ô¤Î
656 ¥é¥ó¤ò¹çÃפ·¤¿Éôʬɽ¸½¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c RULE ¤ò¼Â¹Ô¤¹¤ë¡£¹çÃפ·¤¿
657 Éôʬ¤Ï¤³¤Îµ¬Â§¤Ë¤è¤Ã¤Æ¾ÃÈñ¤µ¤ì¤ë¡£
659 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
661 ¤³¤Îµ¬Â§¤¬¥¹¥Æ¡¼¥¸¤ÎºÇ½é¤Ëµ¬Â§¤Ç¤¢¤ì¤Ð¡¢@c MATCH-INDEX ¤Ï 0 ¤Ç¤¢¤ê¡¢¸½
662 ¹Ô¤Î¥é¥óÁ´ÂΤ˹çÃפ¹¤ë¡£
665 SUBST-BLOCK ::= '(' SOURCE-PATTERN RULE * ')'
667 SOURCE-PATTERN ::= '(' CODE + ')'
668 | (' 'range' CODE CODE ')'
671 ¸½¹Ô¤Î¥é¥ó¤Î¥³¡¼¥ÉÎó¤¬ @c SOURCE-PATTERN ¤È¹çÃפ¹¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï°ì»þ
672 Ū¤Ë¸½¹Ô¤Î¥é¥ó¤ò¹çÃפ·¤¿Éôʬ¤À¤±¤Ë¸ÂÄꤷ¤¿¾å¤Ç¡¢@c RULE ¤ò¼Â¹Ô¤¹¤ë¡£
673 ¹çÃפ·¤¿Éôʬ¤Ï¾ÃÈñ¤µ¤ì¤ë¡£
675 @c SOURCE-PATTERN ¤ÎºÇ½é¤Î·Á¼°¤Ï¡¢¹çÃפ¹¤ë¥°¥ê¥Õ¥³¡¼¥É¤ÎÎó¤ò»ØÄꤹ¤ë¡£
676 ¤³¤Î¾ì¹ç¡¢¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¤ò 0 ¤Ë¥ê¥»¥Ã¥È¤¹¤ë¡£
678 Æó¤Ä¤á¤Î·Á¼°¤Ï¡¢¥³¡¼¥ÉÎó¤ÎºÇ½é¤Î¥°¥ê¥Õ¥³¡¼¥É¤ÎÈϰϤò»ØÄꤹ¤ë¡£¤³¤Î¾ì¹ç¡¢
679 ¤³¤Îµ¬Â§¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥³¡¼¥É¥ª¥Õ¥»¥Ã¥È¤òºÇ½é¤Î¥°¥ê¥Õ¥³¡¼¥É¤«¤éÈϰϤò»Ø
680 Äꤹ¤ë½é¤á¤Î @c CODE ¤ò°ú¤¤¤¿¤â¤Î¤ËÀßÄꤹ¤ë¡£
682 ¹çÃפ¹¤ëÉôʬ¤¬Ìµ¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£
685 COND-BLOCK ::= '(' 'cond' RULE + ')'
688 ¤³¤Îµ¬Â§¤Ï @c RULE ¤ò½ç¤Ë¡¢¤É¤ì¤«¤¬À®¸ù¤¹¤ë¤Þ¤Ç¼Â¹Ô¤¹¤ë¡£¤É¤Î¥ë¡¼¥ë¤â
689 À®¸ù¤·¤Ê¤±¤ì¤Ð¡¢¤³¤Îµ¬Â§¤Ï¼ºÇÔ¤¹¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤ÐÀ®¸ù¤Ç¤¢¤ë¡£
695 @c OTF-SPEC ¤Ï¡¢OTF ¥É¥é¥¤¥Ð¤Ø¤Î»Ø¼¨¤ò»ØÄꤹ¤ë̾Á°¤ò»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
696 ̾Á°¤Ï°Ê²¼¤Îʸˡ¤Ë½¾¤¦¡£
699 OTF-SPEC-NAME ::= 'otf:' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
703 LANGSYS ::= '/' SYMBOL
705 GSUB-FEATURES ::= '=' FEATURE-LIST ?
707 GPOS-FEATURES ::= '+' FEATURE-LIST ?
709 FEATURE-LIST ::= ( SYMBOL ',' ) * [ SYMBOL | '*' ]
713 ³Æ @c SYMBOL ¤Ï OpenType specification Ãæ¤Ç¤Î¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£
715 @c SCRIPT ¤Ë¤Ä¤¤¤Æ¤Ï¡¢@c SYMBOL ¤Ï¥¹¥¯¥ê¥×¥È¥¿¥°Ì¾¤òɽ¤¹¡£Devanagari
718 @c LANGSYS ¤Î¾ì¹ç¤Ï¡¢@c SYMBOL ¤Ï¸À¸ì¥·¥¹¥Æ¥à¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£@c
719 LANGSYS ¤¬¾Êά¤µ¤ì¤ì¤Ð¡¢¥Ç¥Õ¥©¥ë¥È¤Î¸À¸ì¥·¥¹¥Æ¥à¥Æ¡¼¥Ö¥ë¤¬»ÈÍѤµ¤ì¤ë¡£
721 @c GSUB-FEATURES ¤Ç¤Ï¡¢ @c FEATURE LIST Ãæ¤Î³Æ @c SYMBOL ¤Ï ŬÍѤ¹¤ë
722 GSUB feature ¥¿¥°Ì¾¤ò»ØÄꤹ¤ë¡£'*' ¤Ï»Ä¤ê¤¹¤Ù¤Æ¤Î feature ¤ò»ØÄꤹ¤ë¤¿
723 ¤á¤ËºÇ¸å¤ÎÍ×ÁǤȤ·¤ÆÍѤ¤¤ë¤³¤È¤¬¤Ç¤¤ë¡£ @c SYMBOL ¤ÎÁ°¤Ë'~' ¤¬¤Ä¤¤¤Æ
724 ¤ª¤ê¡¢ºÇ¸å¤ÎÍ×ÁǤ¬ '*' ¤Ê¤é¤Ð¡¢@c SYMBOL ¤ÏŬÍѤ¹¤ëfeature ¤«¤é½ü¤«¤ì
725 ¤ë¡£@c SYMBOL ¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢GSUB feature ¤ÏŬÍѤµ¤ì¤Ê¤¤¡£@c
726 GSUB-FEATURES ¼«ÂΤ¬¾Êά¤µ¤ì¤ì¤Ð¤¹¤Ù¤Æ¤Î GSUB feature ¤¬Å¬ÍѤµ¤ì¤ë¡£
728 @c GPOS-FEATURES ¤Î»ØÄê¤Ï @c GSUB-FEATURES ¤Î¾ì¹ç¤ÈƱÍͤǤ¢¤ë¡£
730 Á´¤Æ¤Î¥¿¥°Ì¾¤Ï ASCII ¤Î£´Ê¸»ú¤Ç¤¢¤ë¤³¤È¡£
732 OpenType ¤Î»ØÄêÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï¼¡¤Î¥Ú¡¼¥¸¤ò»²¾È¤Î¤³¤È¡£\n
733 <http://www.microsoft.com/typography/otspec/default.htm>
739 @c COMBINING ¤Ï¡¢ ¼¡¤Î¥°¥ê¥Õ¤òÁ°¤Î¤â¤Î¤È¤É¤¦·ë¹ç¤¹¤ë¤«¤Î»Ø¼¨¤ò̾Á°¤È¤·
740 ¤Æ»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£¤³¤Î¥ë¡¼¥ë¤Ï¥Ç¥Õ¥©¥ë¥È¤Î·ë¹çµ¬Â§¤ò¥·¥ó¥Ü¥ë̾¸ÇÍ
741 ¤ÎÀ°¿ô¥³¡¼¥É¤Ë¥»¥Ã¥È¤¹¤ë¡£Ì¾Á°¤Ï°Ê²¼¤Îʸˡ¤Ë½¾¤¦¡£
745 COMBINING-NAME ::= VPOS HPOS OFFSET VPOS HPOS
747 VPOS ::= 't' | 'c' | 'b' | 'B'
749 HPOS ::= 'l' | 'c' | 'r'
751 OFFSET :: = '.' | XOFF | YOFF XOFF ?
753 XOFF ::= ('<' | '>') INTEGER ?
755 YOFF ::= ('+' | '-') INTEGER ?
758 @c VPOS ¤È @c HPOS ¤Ï¼¡¤Î¤è¤¦¤Ë¿âľ¡¢¿åÊ¿°ÌÃÖ¤ò»ØÄꤹ¤ë¡£
763 0----1----2 <---- top 0 t l
767 9 10 11 <---- center 4 B c
769 --3----4----5-- <-- baseline 6 b l
771 6----7----8 <---- bottom 8 b r
774 left center right 11 c r
777 º¸¤Î¿Þ¤Ï¤¢¤ë¥°¥ê¥Õ¤Î 12 ¤Î»²¾ÈÅÀ¤ò 0 ¤«¤é 11 ¤Þ¤Ç¤Î¿ô»ú¤Ç¼¨¤·¤Æ¤¤¤ë¡£
778 »Í³Ñ·Á 0-6-8-2 ¤Ï¥°¥ê¥Õ¤Îɽ¼¨Îΰè¤Ç¤¢¤ê¡¢°ÌÃÖ3, 4, 5 ¤Ï¥Ù¡¼¥¹¥é¥¤¥ó¾å
779 ¤Ë¤¢¤ë¡£ 9 ¤È 11 ¤Ï¤½¤ì¤¾¤ìÀþ0-6 ¤È 2-8 ¤ÎÃæ¿´¤Ç¤¢¤ë¡£1, 10, 4, 7 ¤Ï¤½
780 ¤ì¤¾¤ìÀþ1-2, 3-5, 9-11, 6-8 ¤ÎÃæ¿´¤Ç¤¢¤ë¡£
782 ±¦¤Îɽ¤Ï¡¢³Æ»²¾ÈÅÀ¤¬@c VPOS ¤È @c HPOS ¤ÎÁȹ礻¤Ë¤è¤Ã¤Æ¤É¤Î¤è¤¦¤Ë»ØÄê
783 ¤µ¤ì¤ë¤«¤ò¼¨¤·¤Æ¤¤¤ë¡£
785 @c COMBINING-NAME ¤ÎÄêµÁÃæ¤ÎºÇ½é¤Î @c VPOS ¤È @c HPOS ¤Ï¡¢Á°¤Î¥°¥ê¥Õ¤Î
786 »²¾ÈÅÀ¤ò¡¢Æó¤ÄÌܤΠ@c VPOS ¤È @c HPOS ¤Ï¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤ò»ØÄꤹ¤ë¡£
787 ¼¡¤Î¥°¥ê¥Õ¤Ï¤³¤ÎÆó¸Ä¤Î»²¾ÈÅÀ¤¬½Å¤Ê¤ë¤è¤¦¤ËÉÁ¤«¤ì¤ë¡£
789 @c OFFSET ¤Ï½Å¤Ê¤ê¤«Â¾¤Î¾ÜºÙ¤ò»ØÄꤹ¤ë¡£'.' ¤Ç¤¢¤ì¤Ð¡¢»²¾ÈÅÀÆó¤Ä¤ÏƱ¤¸
792 @c XOFF ¤Ï¡¢¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤Î X ºÂɸ¤ò¡¢Á°¤Î»²¾ÈÅÀ¤«¤é¤É¤ì¤Û¤É±¦
793 ('<') ¤¢¤ë¤¤¤Ïº¸ ('>') ¤Ø¤º¤é¤¹¤«»ØÄꤹ¤ë¡£
795 @c YOFF ¤Ï¡¢¼¡¤Î¥°¥ê¥Õ¤Î»²¾ÈÅÀ¤Î Y ºÂɸ¤ò¡¢Á°¤Î»²¾ÈÅÀ¤«¤é¤É¤ì¤Û¤É¾å
796 ('+') ¤¢¤ë¤¤¤Ï²¼ ('-') ¤Ø¤º¤é¤¹¤«»ØÄꤹ¤ë¡£
798 ¤É¤Á¤é¤Î¾ì¹ç¤Ë¤â¡¢@c INTEGER ¤Ï¥Õ¥©¥ó¥È¥µ¥¤¥º¤Î²¿¡ó¤º¤é¤¹¤«¤ò¼¨¤¹ÃͤÇ
799 ¤¢¤ë¡£¤¹¤Ê¤ï¤Á¡¢¤â¤· @c INTEGER ¤¬ 10 ¤Ê¤é¤Ð¥Õ¥©¥ó¥È¥µ¥¤¥º¤Î10% (1/10)
800 ¤º¤é¤¹¤³¤È¤Ë¤Ê¤ë¡£ @c INTEGER ¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢5 ¤¬»ØÄꤵ¤ì¤¿¤â¤Î
803 ¼¡¤Î¥°¥ê¥Õ¤¬Á°¤Î¥°¥ê¥Õ¤Ë·ë¹ç¤µ¤ì¤ë¤È¡¢¤½¤ì¤é¤Ï°ì¤Ä¤Î·ë¹ç¥°¥ê¥Õ¤È¤·¤Æ°·
807 MACRO-NAME ::= SYMBOL
810 @c MACRO-NAME ¤Ï @c MACRO-DEF ¤Î¤¤¤º¤ì¤«¤Ë¸½¤ï¤ì¤ë¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢Âбþ
811 ¤¹¤ë@c RULE ¤ÎÎó¤ËŸ³«¤µ¤ì¤ë¡£
813 @subsection flt-context-dependent ʸ̮¤Ë°Í¸¤¹¤ë¿¶Éñ
815 ¤³¤³¤Þ¤Ç¤Ï¡¢ÆÃÄê¤Î¥Õ¥©¥ó¥È¤ÇÉÁ¤«¤ì¤ë³Æʸ»ú¡¿¥°¥ê¥ÕÎó¤¬Ê¸Ì®¼«Í³¤Ç¤¢¤ë¤³
816 ¤È¡¢¤¹¤Ê¤ï¤ÁÁ°¸å¤Î¥°¥ê¥Õ¤Ë±Æ¶Á¤µ¤ì¤Ê¤¤¤³¤È¤òÁ°Äó¤È¤·¤Æ¤¤¿¡£¤³¤ì¤Ï¡¢Îó
817 S1 ¤¬¥Õ¥©¥ó¥ÈF1 ¤Ë¤è¤Ã¤ÆÉÁ¤«¤ì¡¢Àè¹Ô¤¹¤ëÎó S0 ¤¬¾ï¤Ë¥Õ¥©¥ó¥È F0 ¤òÍ×µá
823 ÍøÍѲÄǽ¤Ê¥Õ¥©¥ó¥È F0 F1
826 ¤·¤«¤·»þ¤Ë¤Ï¡¢Îó¤òÌÀ³Î¤Ë¶èÀڤ뤳¤È¤¬¤Ç¤¤Ê¤¤¾ì¹ç¤â¤¢¤ë¡£Àè¹Ô¤¹¤ëÎó S0
827 ¤¬ F0 ¤À¤±¤Ç¤Ê¤¯ F1 ¤Ç¤âÉÁ¤±¤ë¤È¤·¤è¤¦¡£
832 ÍøÍѲÄǽ¤Ê¥Õ¥©¥ó¥È F0,F1 F1
835 ¤³¤Î¾ì¹ç¡¢Àè¹Ô¤¹¤ë S0 ¤òÉÁ¤¯¤¿¤á¤Ë»È¤ï¤ì¤¿¥°¥ê¥Õ¤¬ S1 ¤Î¥°¥ê¥Õ¤ÎÀ¸À®¤Ë
836 ±Æ¶Á¤òÍ¿¤¨¤ë¤³¤È¤â¤¢¤ë¡£¤½¤³¤Ç S1 ¤Î½èÍý¤ÎºÝ¤Ë¤¹¤Ç¤Ë½èÍý¤Î½ª¤Ã¤¿ S0 ¤Ë
837 ´Ø¤¹¤ë¾ðÊó¤Ë¥¢¥¯¥»¥¹¤¹¤ëɬÍפ¬¤¢¤ë¡£ºÇ½é¤Î¥¹¥Æ¡¼¥¸¡Ê¤³¤Î¥¹¥Æ¡¼¥¸¤Î¤ß¡Ë
838 ¤ÎÀ¸À®µ¬Â§¤Ï¡¢½èÍýºÑ¤ß¤ÎÉôʬ¤Ø¥¢¥¯¥»¥¹¤¹¤ëÆÃÊ̤ÊÀµµ¬É½¸½¤òµö¤·¤Æ¤¤¤ë¡£
844 @c RE0 ¤È @c RE1 ¤ÏÀè¹Ô¤ÎÎó S0 ¤È¸å³¤ÎÎó S1 ¤Ë¤½¤ì¤¾¤ìÂбþ¤¹¤ëÀµµ¬É½
847 Æó¤Ä¤ÎÀµµ¬É½¸½¤Î´Ö¤Î¥¹¥Ú¡¼¥¹¤ËÃí°Õ¡£¤³¤ì¤ÏÆÃÊ̤ʥ«¥Æ¥´¥ê ' ' ¤ò¼¨¤·¤Æ
848 ¤¤¤ë (¾åµ»²¾È) ¡£¤³¤ÎÀµµ¬É½¸½¤Ï¥Õ¥©¥ó¥È F1 ¤ò»ÈÍѤ¹¤ë¥°¥ê¥ÕÀ¸À®µ¬Â§¤Ë
849 °¤·¤Æ¤ª¤ê¡¢¤·¤¿¤¬¤Ã¤Æ RE1 ¤À¤±¤Ç¤Ê¤¯RE0 ¤â F1 ÍѤΥ«¥Æ¥´¥ê¤òÍѤ¤¤Æɽ
850 ¸½¤µ¤ì¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£¤Ä¤Þ¤ê¡¢Àè¹Ô¤¹¤ëÎóS0 ¤¬ F1 ÍѤΥ«¥Æ¥´¥ê¤Çɽ¤»
851 ¤Ê¤¤¾ì¹ç¤Ë¤Ï(¾å¤ÎºÇ½é¤ÎÎã¤Î¤è¤¦¤Ë) ¤³¤Î¥Ñ¥¿¡¼¥ó¤ò»ý¤ÄÀ¸À®µ¬Â§¤Ë¤Ï¹çÃ×
854 @subsection flt-seealso »²¾È
856 @ref mdbGeneral "mdbGeneral(5)",
857 @ref flt-list "FLTs provided by the m17n database"
861 @section mdbFLT Font Layout Table
863 @subsection flt-description DESCRIPTION
865 For simple scripts, the rendering engine converts character codes into glyph
866 codes one by one by consulting the encoding of each selected font.
867 But, to render text that requires complicated layout (e.g. Thai and
868 Indic scripts), one to one conversion is not sufficient. A sequence
869 of characters may have to be drawn as a single ligature. Some
870 glyphs may have to be drawn at 2-dimensionally shifted positions.
872 To handle those complicated scripts, the m17n library uses Font Layout
873 Tables (FLTs for short). The FLT driver interprets an FLT and
874 converts a character sequence into a glyph sequence that is ready to
875 be passed to the rendering engine.
877 An FLT can contain information to extract a grapheme cluster from a
878 character sequence and to reorder the characters in the cluster, in
879 addition to information found in OpenType Layout Tables (CMAP, GSUB,
882 An FLT is a cascade of one or more conversion stages. In each stage, a
883 sequence is converted into another sequence to be read in the
884 next stage. The length of sequences may differ from stage to
885 stage. Each element in a sequence has the following integer attributes.
890 In the first conversion stage, this is the character code in the
891 original character sequence. In the last stage, it is the glyph code
892 passed to the rendering engine. In other cases, it is an intermediate
897 This is the category code defined in the @c CATEGORY-TABLE
898 of the current stage.
902 If nonzero, it specifies how to combine this (intermediate) glyph
903 with the previous one.
905 <li> left-padding-flag
907 If nonzero, it instructs the rendering function to insert a padding
908 space before this (intermediate) glyph so that the glyph does not
909 overlap with the previous one.
911 <li> right-padding-flag
913 If nonzero, it instructs the rendering function to insert a padding
914 space after this (intermediate) glyph so that the glyph does not
915 overlap with the next one.
919 When the layout engine draws text, it at first determines a font and
920 an FLT for each character in the text. For each subsequence of
921 characters that use use the same font and FLT, the layout engine
922 generates an intermediate glyph sequence from the character
923 subsequence. Each element in the intermediate glyph sequence
924 has the corresponding character code as the code attribute and zeroes
925 for other attributes. This sequence is processed in the
926 first stage of FLT as the current @e run (substring).
928 Each stage works as follows.
930 At first, if the stage has a @c CATEGORY-TABLE, the category of each glyph
931 in the current run is updated. If there is a glyph that has no category,
932 the current run ends before that glyph.
934 Then, the default values of code-offset, combining-spec, and left-padding-flag
935 of this stage are initialized to zero.
937 Next, the initial conversion rule of the stage is applied to the
940 Lastly, the current run is replaced with the newly produced
941 (intermediate) glyph sequence.
943 @subsection flt-syntax SYNTAX and SEMANTICS
945 The m17n library loads an FLT from the m17n database using the tag
946 \<font, layouter, FLT-NAME\>. The date format of an FLT is as follows:
949 FONT-LAYOUT-TABLE ::= STAGE0 STAGE *
951 STAGE0 ::= CATEGORY-TABLE GENERATOR
953 STAGE ::= CATEGORY-TABLE ? GENERATOR
955 CATEGORY-TABLE ::= '(' 'category' CATEGORY-SPEC + ')'
957 CATEGORY-SPEC ::= '(' CODE CATEGORY ')'
958 | '(' CODE CODE CATEGORY ')'
965 In the definition of @c CATEGORY-SPEC, @c CODE is a glyph code, and @c
966 CATEGORY is ASCII code of an upper or lower letter, i.e. one of 'A',
967 ... 'Z', 'a', .. 'z'.
969 The first form of @c CATEGORY-SPEC assigns @c CATEGORY to a glyph
970 whose code @c CODE. The second form assigns @c CATEGORY to glyphs
971 whose code falls between the two @c CODEs.
974 GENERATOR ::= '(' 'generator' RULE MACRO-DEF * ')'
976 RULE ::= REGEXP-BLOCK | MATCH-BLOCK | SUBST-BLOCK | COND-BLOCK
977 | DIRECT-CODE | COMBINING-SPEC | OTF-SPEC
978 | PREDEFINED-RULE | MACRO-NAME
980 MACOR-DEF ::= '(' MACRO-NAME RULE + ')'
983 Each @c RULE specifies glyphs to be consumed and glyphs to be produced. When
984 some glyphs are consumed, they are taken away from the current run. A
985 rule may fail in some condition. If not described explicitly to
986 fail, it should be regarded that the rule succeeds.
989 DIRECT-CODE ::= INTEGER
992 This rule consumes no glyph and produces a glyph which has the
993 following attributes:
996 <li> code : @c INTEGER plus the default code-offset
997 <li> combining-spec : default value
998 <li> left-padding-flag : default value
999 <li> right-padding-flag : zero
1002 After having produced the glyph, the default code-offset,
1003 combining-spec, and left-padding-flag are all reset to zero.
1006 PREDEFINED-RULE ::= '=' | '*' | '<' | '>' | '|' | '[' | ']'
1009 They perform actions as follows.
1014 This rule consumes the first glyph in the current run and produces the
1015 same glyph. It fails if the current run is empty.
1019 This rule repeatedly executes the previous rule.
1020 If the previous rule fails, this rule does nothing and fails.
1024 This rule specifies the start of a grapheme cluster.
1028 This rule specifies the end of a grapheme cluster.
1032 This rule sets the default left-padding-flag to 1.
1033 No glyph is consumed. No glyph is produced.
1037 This rule changes the right-padding-flag of the lastly generated
1039 No glyph is consumed. No glyph is produced.
1043 This rule consumes no glyph and produces a special glyph whose
1044 category is ' ' and other attributes are zero.
1045 This is the only rule that produces that special glyph.
1050 REGEXP-BLOCK ::= '(' REGEXP RULE * ')'
1055 @c MTEXT is a regular expression that should match the sequence of
1056 categories of the current run. If a match is found, this rule
1057 executes @c RULEs temporarily limiting the current run to the matched
1058 part. The matched part is consumed by this rule.
1060 Parenthesized subexpressions, if any, are recorded to be used in @c
1061 MATCH-BLOCK that may appear in one of @c RULEs.
1063 If no match is found, this rule fails.
1066 MATCH-BLOCK ::= '(' MATCH-INDEX RULE * ')'
1068 MATCH-INDEX ::= INTEGER
1071 @c MATCH-INDEX is an integer specifying a parenthesized subexpression
1072 recorded by the previous @c REGEXP-BLOCK. If such a subexpression was
1073 found by the previous regular expression matching, this rule executes @c
1074 RULEs temporarily limiting the current run to the matched part
1075 of the subexpression. The matched part is consumed by this rule.
1077 If no match was found, this rule fails.
1079 If this is the first rule of the stage, @c MATCH-INDEX must be 0, and
1080 it matches the whole current run.
1083 SUBST-BLOCK ::= '(' SOURCE-PATTERN RULE * ')'
1085 SOURCE-PATTERN ::= '(' CODE + ')'
1086 | (' 'range' CODE CODE ')'
1089 If the sequence of codes of the current run matches @c SOURCE-PATTERN,
1090 this rule executes @c RULEs temporarily limiting the current run to
1091 the matched part. The matched part is consumed.
1093 The first form of @c SOURCE-PATTERN specifies a sequence of glyph codes to be
1094 matched. In this case, this rule resets the default code-offset to
1097 The second form specifies a range of codes that should match the first
1098 glyph code of the code sequence. In this case, this rule sets the
1099 default code-offset to the first glyph code minus the first @c CODE
1100 specifying the range.
1103 If no match is found, this rule fails.
1106 COND-BLOCK ::= '(' 'cond' RULE + ')'
1109 This rule sequentially executes @c RULEs until one succeeds. If no
1110 rule succeeds, this rule fails. Otherwise, it succeeds.
1116 @c OTF-SPEC is a symbol whose name specifies an instruction to the OTF
1117 driver. The name has the following syntax.
1120 OTF-SPEC-NAME ::= 'otf:' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
1124 LANGSYS ::= '/' SYMBOL
1126 GSUB-FEATURES ::= '=' FEATURE-LIST ?
1128 GPOS-FEATURES ::= '+' FEATURE-LIST ?
1130 FEATURE-LIST ::= ( SYMBOL ',' ) * [ SYMBOL | '*' ]
1134 Each @c SYMBOL specifies a tag name defined in the OpenType
1137 For @c SCRIPT, @c SYMBOL specifies a Script tag name (e.g. deva for
1140 For @c LANGSYS, @c SYMBOL specifies a Language System tag name. If @c
1141 LANGSYS is omitted, the Default Language System
1144 For @c GSUB-FEATURES, each @c SYMBOL in @c FEATURE LIST specifies a GSUB Feature tag name
1145 to apply. '*' is allowed as the last item to specify all remaining
1146 features. If @c SYMBOL is preceded by '~' and the last item is '*',
1147 @c SYMBOL is excluded from the features to apply. If no @c SYMBOL is
1148 specified, no GSUB feature is applied. If @c GSUB-FEATURES itself is
1149 omitted, all GSUB features are applied.
1151 The specification of @c GPOS-FEATURES is analogous to that of @c
1154 Please note that all the tags above must be 4 ASCII printable characters.
1156 See the following page for the OpenType specification.\n
1157 <http://www.microsoft.com/typography/otspec/default.htm>
1160 COMBINING ::= SYMBOL
1163 @c COMBINING is a symbol whose name specifies how
1164 to combine the next glyph with the previous one. This rule sets the
1165 default combining-spec to an integer code that is unique to the symbol
1166 name. The name has the following syntax.
1169 COMBINING-NAME ::= VPOS HPOS OFFSET VPOS HPOS
1171 VPOS ::= 't' | 'c' | 'b' | 'B'
1173 HPOS ::= 'l' | 'c' | 'r'
1175 OFFSET :: = '.' | XOFF | YOFF XOFF ?
1177 XOFF ::= ('<' | '>') INTEGER ?
1179 YOFF ::= ('+' | '-') INTEGER ?
1182 @c VPOS and @c HPOS specify the vertical and horizontal positions
1188 0----1----2 <---- top 0 t l
1192 9 10 11 <---- center 4 B c
1194 --3----4----5-- <-- baseline 6 b l
1196 6----7----8 <---- bottom 8 b r
1199 left center right 11 c r
1202 The left figure shows 12 reference points of a glyph by numbers 0 to
1203 11. The rectangle 0-6-8-2 is the bounding box of the glyph, the
1204 positions 3, 4, and 5 are on the baseline, 9 and 11 are on the center
1205 of the lines 0-6 and 2-8 respectively, 1, 10, 4, and 7 are on the
1206 center of the lines 1-2, 3-5, 9-11, and 6-8 respectively.
1208 The right table shows how those reference points are specified by a
1209 pair of @c VPOS and @c HPOS.
1211 The first @c VPOS and @c HPOS in the definition of @c COMBINING-NAME
1213 reference point of the previous glyph, and the second @c VPOS and @c
1214 HPOS specify that of the next glyph.
1215 The next glyph is drawn so that these two reference points align.
1217 @c OFFSET specifies the way of alignment in detail. If it is '.', the
1218 reference points are on the same position.
1220 @c XOFF specifies how much the X position of the reference point of
1221 the next glyph should be shifted to the right ('<') or left ('>') from
1222 the previous reference point.
1224 @c YOFF specifies how much the Y position of the reference point the
1225 next glyphshould be shifted upward ('+') or downward ('-') from the
1226 previous reference point.
1228 In both cases, @c INTEGER is the amount of shift expressed as a
1229 percentage of the font size, i.e., if @c INTEGER is 10, it means
1230 10% (1/10) of the font size. If @c INTEGER is omitted, it is assumed that
1233 Once the next glyph is combined with the previous one, they
1234 are treated as a single combined glyph.
1237 MACRO-NAME ::= SYMBOL
1240 @c MACRO-NAME is a symbol that appears in one of @c MACRO-DEF. It is
1241 exapanded to the sequence of the correponding @c RULEs.
1243 @subsection flt-context-dependent CONTEXT DEPENDENT BEHAVIOR
1245 So far, it has been assumed that each sequence, which is drawn with a
1246 specific font, is context free, i.e. not affected by the glyphs
1247 preceding or following that sequence. This is true when sequence S1
1248 is drawn with font F1 while the preceding sequence S0 unconditionally
1253 currently used font F0 F1
1254 usable font(s) F0 F1
1257 Sometimes, however, a clear separation of sequences is not possible.
1258 Suppose that the preceding sequence S0 can be drawn not only with F0
1263 currently used font F0 F1
1264 usable font(s) F0,F1 F1
1267 In this case, glyphs used to draw the preceding S0 may affect glyph
1268 generation of S1. Therefore it is necessary to access information
1269 about S0, which has already been processed, when processing S1.
1270 Generation rules in the first stage (only in the first stage) accept a
1271 special regular expression to access already processed parts.
1277 @c RE0 and @c RE1 are regular expressions that match the preceding
1278 sequence S0 and the following sequence S1, respectively.
1280 Pay attention to the space between the two regular expressions. It
1281 represents the special category ' ' (see above). Note that the
1282 regular expression above belongs to glyph generation rules using font
1283 F1, therefore not only RE1 but also RE0 must be expressed with the
1284 categories for F1. This means when the preceding sequence S0 cannot
1285 be expressed with the categories for F1 (as in the first example
1286 above) generation rules having these patterns never match.
1288 @subsection flt-seealso SEE ALSO
1290 @ref mdbGeneral "mdbGeneral(5)",
1291 @ref flt-list "FLTs provided by the m17n database"
1295 @section mdbFontEncoding ¥Õ¥©¥ó¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°
1297 @subsection font-encoding-description ÀâÌÀ
1299 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é \<font, encoding\> ¥¿¥°¤Ë¤è¤Ã
1300 ¤Æ¸Ä¡¹¤Î¥Õ¥©¥ó¥È¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ë´Ø¤¹¤ë¾ðÊó¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿
1301 ¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
1304 FONT-ENCODING ::= PER-FONT *
1306 PER-FONT ::= '(' FONT-SPEC ENCODING [ REPERTORY ] ')'
1309 '(' [ FOUNDRY FAMILY
1310 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1316 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1317 REGISTRY ¤Ï¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£¤ËÂбþ¤¹¤ë¥·
1318 ¥ó¥Ü¥ë¤Ç¤¢¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¡£
1320 ¤¿¤È¤¨¤Ð¤³¤Î @c FONT-SPEC:
1323 (nil alice0\ lao iso8859-1)
1326 ¤Ï¥Õ¥©¥ó¥È¤Î¥Õ¥¡¥ß¥ê̾¤¬ "alice0 lao" ¤Ç¥ì¥¸¥¹¥È¥ê¤¬ "iso8859-1" ¤Ç¤¢
1327 ¤ë¤¹¤Ù¤Æ¤Î¥Õ¥©¥ó¥È¤ËŬÍѤǤ¤ë¡£
1329 @c ENCODING ¤Ïʸ»ú¥»¥Ã¥È¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£@c FONT-SPEC ¤Ë¹çÃפ¹¤ë
1330 ¥Õ¥©¥ó¥È¤Ï¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤ÎÁ´Ê¸»ú¤ò¥µ¥Ý¡¼¥È¤·¡¢¤½¤Îʸ»ú¥»¥Ã¥È¤Ë¤è¤Ã¤Æ
1331 ʸ»ú¥³¡¼¥É¤Ï¤½¤Î¥Õ¥©¥ó¥È¤ÎÂбþ¤¹¤ë¥°¥ê¥Õ¥³¡¼¥É¤Ë¥Þ¥Ã¥×¤µ¤ì¤ë¡£
1333 @c REPERTORY ¤Ïʸ»ú¥»¥Ã¥È¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤« "nil" ¤Ç¤¢¤ë¡£¾Êά¤·¤¿¾ì¹ç¤Ï¡¢
1334 @c ENCODING ¤ò @c REPERTORY ¤Ë»ØÄꤷ¤¿¤Î¤ÈƱ¤¸°ÕÌ£¤Ë¤Ê¤ë¡£"nil" ¤Ç¤Ê¤±
1335 ¤ì¤Ð¡¢Ê¸»ú¥»¥Ã¥È¤Ï¥Õ¥©¥ó¥È¤Î¥ì¥Ñ¡¼¥È¥ê¡¢¤¹¤Ê¤ï¤Á¥µ¥Ý¡¼¥È¤¹¤ëʸ»ú¤ò¼¨¤¹¡£
1336 ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢ÆÃÄê¤Îʸ»ú¤¬¤½¤Î¥Õ¥©¥ó¥È¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ï
1337 ¸Ä¡¹¤Î¥Õ¥©¥ó¥È¥É¥é¥¤¥Ð¤ËÌ䤤¹ç¤ï¤»¤ë¡£
1339 ¤¤¤ï¤æ¤ë¥æ¥Ë¥³¡¼¥É¥Õ¥©¥ó¥È (¥ì¥¸¥¹¥È¥ê¤Ï "iso10646-1") ¤Ë¤Ä¤¤¤Æ¤Ï¡¢Éá
1340 ÄÌ¥æ¥Ë¥³¡¼¥Éʸ»ú¤Î°ìÉô¤·¤«¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¤¿¤á¡¢@c REPERTORY ¤ò
1341 "nil" ¤Ë¤¹¤ë¤³¤È¤¬Ë¾¤Þ¤·¤¤¡£ */
1344 @section mdbFontEncoding Font Encoding
1346 @subsection font-encoding-description DESCRIPTION
1348 The m17n library loads information about the encoding of each font
1349 form the m17n database by the tags \<font, encoding\>. The data is
1350 loaded as a plist of this format.
1353 FONT-ENCODING ::= PER-FONT *
1355 PER-FONT ::= '(' FONT-SPEC ENCODING [ REPERTORY ] ')'
1358 '(' [ FOUNDRY FAMILY
1359 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1365 @c FONT-SPEC is to specify properties of a font. @c FOUNDRY to @c
1366 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1367 of a font. See @ref m17nFont for the meaning of each property.
1369 For instance, this @c FONT-SPEC:
1372 (nil alice0\ lao iso8859-1)
1375 should be applied to all fonts whose family name is "alice0 lao", and
1376 registry is "iso8859-1".
1378 @c ENCODING is a symbol representing a charset. A font matching @c
1379 FONT-SPEC supports all characters of the charset, and a character code
1380 is mapped to the corresponding glyph code of the font by this charset.
1382 @c REPERTORY is a symbol representing a charset or "nil". Omitting it
1383 is the same as specifying @c ENCODING as @c REPERTORY. If it is not
1384 "nil", the charset specifies the repertory of the font, i.e, which
1385 character it supports. Otherwise, whether a specific character is
1386 supported by the font or not is asked to each font driver.
1388 For so called Unicode fonts (registry is "iso10646-1"), it is
1389 recommended to specify "nil" as @c REPERTORY because such fonts
1390 usually supports only a subset of Unicode characters. */
1393 @section mdbFontSize ¥Õ¥©¥ó¥È¥µ¥¤¥º
1395 @subsection font-size-description ÀâÌÀ
1397 »þ¤Ë¥Õ¥©¥ó¥È¤Ï¤½¤Î¥µ¥¤¥º¤Ë¤Ä¤¤¤Æ¸í¤Ã¤¿¾ðÊó¤ò´Þ¤ó¤Ç¤¤¤ë¤³¤È¤¬¤¢¤ë (ŵ·¿
1398 Ū¤ÊÎã¤È¤·¤Æ¤Ï hack ¤µ¤ì¤¿ TrueType ¥Õ¥©¥ó¥È¤Ê¤É) ¡£¤³¤Î¤è¤¦¤Ê¥Õ¥©¥ó¥È
1399 ¤¬Â¾¤Î¥Õ¥©¥ó¥È¤È°ì½ï¤Ë»È¤ï¤ì¤ë¤È¡¢¥ì¥¤¥¢¥¦¥È¤¬¤ª¤«¤·¤¯¤Ê¤ë¡£¤³¤ÎÌäÂê¤ò
1400 ²ò·è¤¹¤ë¤¿¤á¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Ïm17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¥¿¥° \<font,
1401 resize\> ¤ò»ý¤Ä¥Ç¡¼¥¿¤ò¥í¡¼¥É¤·¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¤òÄ´À°¤¹¤ë¤¿¤á¤Î¾ðÊó¤È¤·
1402 ¤ÆÍѤ¤¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¤ò»ý¤Ä¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼
1406 FONT-SIZE-ADJUSTMENT ::= PER-FONT *
1408 PER-FONT ::= '(' FONT-SPEC ADJUST-RATIO ')'
1411 '(' [ FOUNDRY FAMILY
1412 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1415 ADJUST-RATIO ::= INTEGER
1418 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1419 REGISTRY ¤Þ¤Ç¤Ï¡¢¤½¤ì¤¾¤ì¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£
1420 ¤Þ¤Ç¤ËÂбþ¤·¤Æ¤¤¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¤Î¤³¤È¡£
1422 @c ADJUST-RATIO ¤Ï¡¢À°¿ôÃͤǤ¢¤ê¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¤ò¤É¤Î¤è¤¦¤ËÄ´À°¤¹¤ì¤Ð
1423 ¤è¤¤¤«¤ò¥Ñ¡¼¥»¥ó¥È¤Ç¤¢¤é¤ï¤¹¡£¤¿¤È¤¨¤Ð°Ê²¼¤Î @c PER-FONT:
1426 ((devanagari-cdac) 150)
1429 ¤Ï¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Î¥Õ¥©¥ó¥È¥Ï¥ó¥É¥é¤Ë¡¢"devanagari-cdac" ¤È¤¤¤¦¥ì¥¸¥¹
1430 ¥È¥ê¤ò»ý¤Ä¥Õ¥©¥ó¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢Í׵ᤵ¤ì¤¿Â礤µ¤Î 1.5 ÇܤΥµ¥¤¥º¤Î¥Õ¥©¥ó
1431 ¥È¤ò³«¤¯¤è¤¦¤Ë»Ø¼¨¤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
1436 @section mdbFontSize Font Size
1438 @subsection font-size-description DESCRIPTION
1440 In some case, a font contains incorrect information about its size
1441 (typically in the case of a hacked TrueType font), which results in a
1442 bad text layout when such a font is used in combination with the other
1443 fonts. To overcome this problem, the m17n library loads information
1444 about font-size adjustment from the m17n database by the tags \<font,
1445 resize\>. The data is loaded as a plist of this format.
1448 FONT-SIZE-ADJUSTMENT ::= PER-FONT *
1450 PER-FONT ::= '(' FONT-SPEC ADJUST-RATIO ')'
1453 '(' [ FOUNDRY FAMILY
1454 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1457 ADJUST-RATIO ::= INTEGER
1460 @c FONT-SPEC is to specify properties of a font. @c FOUNDRY to @c
1461 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1462 of a font. See @ref m17nFont for the meaning of each property.
1464 @c ADJUST-RATIO is an integer number specifying by percentage how much
1465 the font-size must be adjusted. For instance, this @c PER-FONT:
1468 ((devanagari-cdac) 150)
1471 instructs the font handler of the m17n library to open a font of 1.5
1472 times bigger than a requested size on opening a font whose registry
1473 is "devanagari-cdac".
1477 @section mdbFontset ¥Õ¥©¥ó¥È¥»¥Ã¥È
1479 @subsection fontset-description ÀâÌÀ
1481 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é \<fontset, FONTSET-NAME\> ¥¿
1482 ¥°¤Ë¤è¤Ã¤Æ¥Õ¥©¥ó¥È¥»¥Ã¥È¤ÎÄêµÁ¤ò¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¥Õ¥©¡¼¥Þ¥Ã
1483 ¥È¤Î¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¡£
1486 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
1488 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
1490 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
1492 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
1494 FALLBACK ::= FONT-SPEC-ELEMENT
1496 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
1499 '(' [ FOUNDRY FAMILY
1500 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1504 @c SCRIPT ¤Ï¥¹¥¯¥ê¥×¥È̾ (e.g. latin, han) ¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤« @c nil¤Ç¤¢
1505 ¤ë¡£@c LANGUAGE ¤ÏISO 639 ¤ËÄêµÁ¤µ¤ì¤¿¸À¸ì̾¥³¡¼¥É (e.g. ja, zh) ¤Ç¤¢
1506 ¤ë£²Ê¸»ú¤Î¥·¥ó¥Ü¥ë¤« @c nil ¤Ç¤¢¤ë¡£
1508 @c FONT-SPEC ¤Ï¥Õ¥©¥ó¥È¤Î¥×¥í¥Ñ¥Æ¥£¤ò»ØÄꤹ¤ë¡£@c FOUNDRY ¤«¤é @c
1509 REGISTRY ¤Ï¥Õ¥©¥ó¥È¤Î #Mfoundry ¤«¤é #Mregistry ¥×¥í¥Ñ¥Æ¥£¤ËÂбþ¤¹¤ë¥·
1510 ¥ó¥Ü¥ë¤Ç¤¢¤ë¡£³Æ¥×¥í¥Ñ¥Æ¥£¤Î°ÕÌ£¤Ë¤Ä¤¤¤Æ¤Ï @ref m17nFont »²¾È¡£
1512 @c FLT-NAME ¤Ï¥Õ¥©¥ó¥È¥ì¥¤¥¢¥¦¥È¥Æ¡¼¥Ö¥ë¤Î̾Á°¤Ç¤¢¤ë¡£(@ref mdbFLT).
1514 @subsection fontset-example Îã
1516 ¤³¤ì¤Ï @c PER_SCRIPT ¤ÎÎã¤Ç¤¢¤ë¡£
1521 ((jisx0208.1983-0)))
1528 ¤³¤ì¤Ë¤è¤Ã¤Æ¥Õ¥©¥ó¥È¥»¥ì¥¯¥¿¤Ï¡¢"han" ʸ»ú (¤Ä¤Þ¤ê#Mscript ¥×¥í¥Ñ¥Æ¥£
1529 ¤¬ 'han' ¤Ç¤¢¤ëʸ»ú)¤Î¤¦¤Á¡¢Ê¸»ú¤Î M-text Ãæ¤Ç¤Î #Mlanguage ¥Æ¥¥¹¥È¥×
1530 ¥í¥Ñ¥Æ¥£¤¬ "ja" ¤Ç¤¢¤ê¤½¤Îʸ»ú¤¬¥Õ¥©¥ó¥È¤Î¥ì¥Ñ¡¼¥È¥ê¡¼¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ì¤â
1531 ¤Î¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥ì¥¸¥¹¥È¥ê¤¬"jisx0208.1983-0" ¤Ç¤¢¤ë¥Õ¥©¥ó¥È¤ò»È¤¦¤³¤È¤ò
1532 »Ø¼¨¤µ¤ì¤ë¡£¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¥ì¥¸¥¹¥È¥ê¤¬ "gb2312.1980-0" ¤ä"big5-0" ¤Ç
1533 ¤¢¤ë¤â¤Î¤¬»î¤µ¤ì¤ë¡£"han" ʸ»ú¤Ë #Mlanguage ¥Æ¥¥¹¥È¥×¥í¥Ñ¥Æ¥£¤¬Ìµ¤±¤ì
1534 ¤Ð¡¢£³¤Ä¤È¤â»î¤µ¤ì¤ë¡£
1536 ¥Õ¥©¥ó¥ÈÁªÂò¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï´Ø¿ô mdraw_text () »²¾È¡£
1540 @section mdbFontset Fontset
1542 @subsection fontset-description DESCRIPTION
1544 The m17n library loads a fontset definition from the m17n database by
1545 the tags \<fontset, FONTSET-NAME\>. The plist format of the data is
1549 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
1551 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
1553 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
1555 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
1557 FALLBACK ::= FONT-SPEC-ELEMENT
1559 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
1562 '(' [ FOUNDRY FAMILY
1563 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
1567 @c SCRIPT is a symbol of script name (e.g. latin, han) or @c nil. @c
1568 LANGUAGE is a two-letter symbol of language name code defined by ISO
1569 639 (e.g. ja, zh) or @c nil.
1571 @c FONT-SPEC is to specify properties of a font. @c FOUNDRY to @c
1572 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
1573 of a font. See @ref m17nFont for the meaning of each property.
1575 @c FLT-NAME is a name of Font Layout Table (@ref mdbFLT).
1577 @subsection fontset-example EXAMPLE
1579 This is an example of @c PER_SCRIPT.
1584 ((jisx0208.1983-0)))
1591 It instructs the font selector to use a font of registry
1592 "jisx0208.1983-0" for a "han" character (i.e. a character whose
1593 #Mscript property is 'han') if the character has #Mlanguage text
1594 property "ja" in an M-text and the character is in the repertories of
1595 such fonts. Otherwise, try a font of registry "gb2312.1980-0" or
1596 "big5-0". If that "han" character does not have #Mlanguage text
1597 property, try all three fonts.
1599 See the function mdraw_text () for the detail of how a font is
1604 @section mdbIM ¥¤¥ó¥×¥Ã¥È¥á¥½¥Ã¥É
1606 @subsection im-description ÀâÌÀ
1608 m17n ¥é¥¤¥Ö¥é¥ê¤Ï¡¢m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤éưŪ¤Ë¥í¡¼¥É¤Ç¤¤ëÆþÎϥ᥽¥Ã¥É
1609 ¥É¥é¥¤¥Ð¤òÄ󶡤·¤Æ¤¤¤ë¡£(@ref m17nInputMethod »²¾È¡£ @latexonly
1610 (P.\pageref{group__m17nInputMethod}) @endlatexonly).
1612 ¤³¤³¤Ç¤ÏÆþÎϥ᥽¥Ã¥ÉÄêµÁ¤Î¥Ç¡¼¥¿¥Õ¥©¡¼¥Þ¥Ã¥È¤òÀâÌÀ¤¹¤ë¡£
1614 @subsection im-format ʸˡ¤È°ÕÌ£
1616 °Ê²¼¤Î¥Ç¡¼¥¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë¤è¤Ã¤ÆÆþÎϥ᥽¥Ã¥É¤¬ÄêµÁ¤µ¤ì¤ë¡£¥É¥é¥¤¥Ð¤Ï¥Õ¥¡
1617 ¥¤¥ë¤ä¥¹¥È¥ê¡¼¥à¤«¤éÄêµÁ¤ò¥í¡¼¥É¤·¡¢¥×¥í¥Ñ¥Æ¥£¥ê¥¹¥È¤Î·Á¼°¤ËÊÑ´¹¤¹¤ë¡£
1620 INPUT-METHOD ::= TITLE MAP-LIST MACRO-LIST ? MODULE-LIST ? STATE-LIST
1622 TITLE ::= '(' 'title' MTEXT ')'
1625 @c MTEXT ¤Ï¤³¤ÎÆþÎϥ᥽¥Ã¥É¤¬Í¸ú¤ÊºÝ¥¹¥¯¥ê¡¼¥ó¾å¤Ëɽ¼¨¤µ¤ì¤ë¥Æ¥¥¹¥È¤Ç¤¢¤ë ¡£
1628 MAP-LIST ::= '(' 'map' MAP * ')'
1630 MAP ::= '(' MAP-NAME RULE * ')'
1634 RULE ::= '(' KEYSEQ MAP-ACTION * ')'
1636 KEYSEQ ::= MTEXT | '(' [ SYMBOL | INTEGER ] * ')'
1639 @c MAP-NAME ÄêµÁÃæ¤Î @c SYMBOL ¤Ï¡¢ @c t ¤¢¤ë¤¤¤Ï @c nil ¤Ç¤¢¤Ã¤Æ¤Ï¤Ê
1642 @c KEYSEQ ÄêµÁÃæ¤Î @c MTEXT ¤Ï¡¢¥¡¼¥Ü¡¼¥É¤«¤éÀ¸À®¤Ç¤¤ëʸ»ú¤Ç¹½À®¤µ¤ì
1643 ¤ë¡£¤¹¤Ê¤ï¤Á @c MTEXT ¤ÏÄ̾ïASCII ʸ»ú¤Î¤ß¤ò´Þ¤à¡£¤·¤«¤·¡¢ÆþÎϥ᥽¥Ã¥É
1644 ¤¬¤¿¤È¤¨¤ÐÀ¾¥è¡¼¥í¥Ã¥ÑÍÑ¥¡¼¥Ü¡¼¥É¤ò»È¤¦¤³¤È¤òÁÛÄꤷ¤¿¤â¤Î¤Ç¤¢¤ì¤Ð¡¢@c
1645 MTEXT ¤Ï Latin-1 ʸ»ú¤ò´Þ¤ó¤Ç¤â¤è¤¤¡£
1647 @c KEYSEQ ÄêµÁÃæ¤Î @c SYMBOL ¤Ï¡¢´Ø¿ô minput_event_to_key () ¤ÎÌá¤êÃÍ
1648 ¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1650 @c KEYSEQ ÄêµÁÃæ¤Î @c INTEGER ¤Ï¡¢Í¸ú¤Êʸ»ú¥³¡¼¥É¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1653 MAP-ACTION ::= ACTION
1655 ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK |
1656 | SHOW | HIDE | PUSHBACK | UNDO | SHIFT | CALL
1657 | SET | IF | '(' MACRO-NAME ')'
1659 PREDEFINED-SYMBOL ::=
1660 '@0' | '@1' | '@2' | '@3' | '@4' |
1661 '@5' | '@6' | '@7' | '@8' | '@9' |
1662 '@<' | '@=' | '@>' | '@-' | '@+' | '@[' | '@]'
1665 MACRO-LIST ::= '(' 'macro' MACRO * ')'
1667 MACRO ::= '(' MACRO-NAME MACRO-ACTION * ')'
1669 MACRO-NAME ::= SYMBOL
1671 MACRO-ACTION ::= ACTION
1674 MODULE-LIST ::= '(' 'module' MODULE * ')'
1676 MODULE ::= '(' MODULE-NAME FUNCTION * ')'
1678 MODULE-NAME ::= SYMBOL
1683 ³Æ @c MODULE ¤Ï³°Éô¥â¥¸¥å¡¼¥ë (ưŪ¥é¥¤¥Ö¥é¥ê) ¤Î̾Á°¤È¤½¤Î¥â¥¸¥å¡¼¥ë
1684 ¤¬¸ø³«¤¹¤ë´Ø¿ô̾¤òÀë¸À¤¹¤ë¡£@c FUNCTION ¤¬ "init" ¤È¤¤¤¦Ì¾Á°¤Ç¤¢¤ì¤Ð¡¢
1685 ¤³¤ÎÆþÎϥ᥽¥Ã¥ÉÍѤÎÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬À¸À®¤µ¤ì¤ëºÝ¤Ë¤Î¤ß¡¢¥Ç¥Õ¥©¥ë¥È¤Î
1686 °ú¿ô (@c CALL ¤ÎÀỲ¾È) ¤È¤È¤â¤Ë¸Æ¤Ð¤ì¤ë¡£ @c FUNCTION ¤¬ "fini" ¤È¤¤
1687 ¤¦Ì¾Á°¤ò»ý¤Æ¤Ð, ÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤¬Ç˲õ¤µ¤ì¤ëºÝ¤Ë¤Î¤ß¡¢¥Ç¥Õ¥©¥ë¥È¤Î°ú¿ô
1691 STATE-LIST ::= '(' 'state' STATE * ')'
1693 STATE ::= '(' STATE-NAME BRANCH * ')'
1695 STATE-NAME ::= SYMBOL
1697 BRANCH ::= '(' MAP-NAME BRANCH-ACTION * ')'
1698 | '(' nil BRANCH-ACTION * ')'
1699 | '(' t BRANCH-ACTION * ')'
1702 @c BRANCH ¤ÎºÇ½é¤Î·Á¼°¤Ç¤Ï¡¢@c MAP-NAME ¤Ï @c MAP ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê¤¯
1703 ¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£¤³¤Î¾ì¹ç¡¢@c MAP-NAME ¤Î @c KEYSEQ ¤Î°ì¤Ä¤Ë¹çÃפ¹¤ë¥¡¼
1704 Î󤬥¿¥¤¥×¤µ¤ì¤ì¤Ð¡¢ @c BRANCH-ACTION ¤¬¼Â¹Ô¤µ¤ì¤ë¡£
1706 @c BRANCH ¤ÎÆó¤ÄÌܤηÁ¼°¤Ç¤Ï¡¢¤½¤Î»þÅÀ¤Î¾õÂ֤Τ¤¤º¤ì¤Î @c BRANCH ¤Ë¤â
1707 ¹çÃפ·¤Ê¤¤¥¡¼Î󤬥¿¥¤¥×¤µ¤ì¤ì¤Ð¡¢@c BRANCH-ACTION¤¬¼Â¹Ô¤µ¤ì¤ë¡£
1709 @c BRANCH ¤Î»°¤ÄÌܤηÁ¼°¤Ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¡¼¤ò½èÍý¤·¤¿¸å¤Ç¤½¤Î¾õÂ֤˰ÜÆ°
1710 ¤·¤¿¾ì¹ç¤Ë @c BRANCH-ACTION ¤¬¼Â¹Ô¤µ¤ì¤ë¡£¤â¤·½é´ü¾õÂ֤Ǥ¢¤ì¤Ð¡¢ÆþÎÏ¥á
1711 ¥½¥Ã¥É¤ÎÆþÎÏ¥³¥ó¥Æ¥¯¥¹¥È¤òÀ¸À®¤·¤¿Ä¾¸å¤Ë @c BRANCH-ACTION ¤ò¼Â¹Ô¤¹¤ë¡£
1714 BRANCH-ACTION ::= ACTION
1717 ÆþÎϥ᥽¥Ã¥É¤Ï¼¡¤ÎÆó¤Ä¤Î¥·¥ó¥Ü¥ë¤Î¥ê¥¹¥È¤ò»ý¤Ä¡£
1722 ¥Þ¡¼¥«¤Ï preediting ¥Æ¥¥¹¥ÈÃæ¤Ç¤Îʸ»ú°ÌÃÖ¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£@c
1723 MARK ¥¢¥¯¥·¥ç¥ó¤Ï¥Þ¡¼¥«¤ò¤¢¤ë°ÌÃÖ¤ËÀßÄꤹ¤ë¡£@c MOVE ¤È @c DELETE ¥¢¥¯
1724 ¥·¥ç¥ó¤Ï¥Þ¡¼¥«¤Î°ÌÃÖ¤ò»²¾È¤¹¤ë¡£
1728 ÊÑ¿ô¤ÏÀ°¿ô¤ÎÃͤò»ý¤Ä¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£ÃͤÏ@c SET ¥¢¥¯¥·¥ç¥ó¤Ë¤è¤Ã¤ÆÀßÄê
1729 ¤µ¤ì¡¢@c SET, @c INSERT, @c IF ¤Ë»²¾È¤µ¤ì¤ë¡£¤¹¤Ù¤Æ¤ÎÊÑ¿ô¤Î½é´üÃÍ¤Ï 0
1734 @c PREDEFINED-SYMBOL ¤Ï¥Þ¡¼¥«¤È¤·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹çÆÃÊ̤ʰÕÌ£¤ò»ý¤Ä¡£
1737 <li> @c @@0, @c @@1, @c @@2, @c @@3, @c @@4, @c @@5, @c @@6, @c @@7, @c @@8, @c @@9
1739 ¤½¤ì¤¾¤ì£°ÈÖÌܤ«¤é£¹ÈÖÌܤΰÌÃÖ
1741 <li> @c @@<, @c @@=, @c @@>
1743 ºÇ½é¤Î¡¢º£¤Î¡¢ºÇ¸å¤Î°ÌÃÖ
1751 ¸õÊä¥ê¥¹¥È¤¬ÊѲ½¤¹¤ëºÝ¤ÎÁ°¤È¼¡¤Î°ÌÃÖ
1754 @c PREDEFINED-SYMBOL ¤Ï @c SELECT ¥¢¥¯¥·¥ç¥óÃæ¤Ç¸õÊä¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹¤È¤·
1755 ¤ÆÍѤ¤¤é¤ì¤¿ºÝÆÃÊ̤ʰÕÌ£¤ò»ý¤Ä¡£
1758 <li> @c @@<, @c @@=, @c @@>
1760 ¸½ºß¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ½é¤Î¡¢º£¤Î¡¢ºÇ¸å¤Î¸õÊä
1764 Á°¸õÊä¡£º£¤Î¸õÊ䤬º£¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ½é¤Î¤â¤Î¤Ç¤¢¤ì¤Ð¡¢Á°¤Î¸õÊ䥰
1765 ¥ë¡¼¥×¤ÎºÇ¸å¤Î¸õÊä¡£
1769 ¼¡¸õÊä¡£º£¤Î¸õÊ䤬º£¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¤ÎºÇ¸å¤Î¤â¤Î¤Ç¤¢¤ì¤Ð¡¢¼¡¤Î¸õÊ䥰
1770 ¥ë¡¼¥×¤ÎºÇ½é¤Î¸õÊä¡£
1774 ¤½¤ì¤¾¤ìÁ°¤È¸å¤Î¸õÊ䥰¥ë¡¼¥×Ãæ¤Ç¡¢º£¤Î¸õÊä¤ÈƱ¤¸¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤ò»ý¤Ä
1778 ³Æ¥¢¥¯¥·¥ç¥ó¤Î°ú¿ô¤È¿¶Éñ¤¤¤Ï°Ê²¼¤ÎÄ̤ꡣ
1781 INSERT ::= '(' 'insert' MTEXT ')'
1784 | '(' 'insert' SYMBOL ')'
1785 | '(' 'insert' '(' CANDIDATES * ')' ')'
1786 | '(' CANDIDATES * ')'
1788 CANDIDATES ::= MTEXT | '(' MTEXT * ')'
1791 Âè°ì¡¢ÂèÆó¤Î·Á¼°¤Ï @c MTEXT ¤ò¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1793 Âè»°¤Î·Á¼°¤Ï¡¢Ê¸»ú @c INTEGER ¤ò¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1795 Âè»Í¤Î·Á¼°¤Ï¡¢@c SYMBOL ¤òÊÑ¿ô¤È¤·¤Æ°·¤¤¡¢¤½¤ÎÃͤ¬Àµ¤·¤¤Ê¸»ú¥³¡¼¥É¤Ç
1796 ¤¢¤ì¤Ð¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤ËÁÞÆþ¤¹¤ë¡£
1798 Âè¸Þ¡¢ÂèÏ»¤Î·Á¼°¤Ç¤Ï¡¢@c CANDIDATES ¤Ï¸õÊ䥰¥ë¡¼¥×¤òɽ¤·¡¢@c
1799 CANDIDATES ¤Î³ÆÍ×ÁǤ¬¸õÊä¤òɽ¤¹¡£¤Ä¤Þ¤ê@c CANDIDATES ¤¬ M-text ¤Ç¤¢¤ì
1800 ¤Ð¡¢¸õÊä¤Ï¤½¤ÎM-text Ãæ¤Îʸ»ú¤Ç¤¢¤ê¡¢@c CANDIDATES ¤¬ M-text ¤Î¥ê¥¹¥È
1801 ¤Ç¤¢¤ì¤Ð¡¢¸õÊä¤Ï¤½¤ì¤é¤Î M-text ¤Ç¤¢¤ë¡£
1803 ¤³¤ì¤é¤Î·Á¼°¤Ï¸½ºß¤Î°ÌÃ֤ξÁ°¤ËºÇ½é¤Î¸õÊä¤òÁÞÆþ¤¹¤ë¡£ÁÞÆþ¤µ¤ì¤¿Ê¸»úÎó
1804 ¤Ë¤Ï¡¢¸õÊä¤Î¥ê¥¹¥È¤È¸½ºßÁªÂò¤µ¤ì¤Æ¤¤¤ë¸õÊä¤ò»Ø¤¹¾ðÊó¤¬Éղ䵤ì¤Æ¤¤¤ë¡£
1806 ÁÞÆþ¤Ë¤è¤Ã¤Æ¥Þ¡¼¥«¤Î°ÌÃ֤ϼ«Æ°Åª¤ËÊѹ¹¤µ¤ì¤ë¡£
1809 DELETE ::= '(' 'delete' SYMBOL ')'
1810 | '(' 'delete' INTEGER ')'
1813 Âè°ì¤Î·Á¼°¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¥Þ¡¼¥«¤È¸½ºß¤Î°ÌÃ֤δ֤Îʸ»ú¤ò
1816 ÂèÆó¤Î·Á¼°¤Ï @c INTEGER ¤òʸ»ú°ÌÃ֤Ȥ·¤Æ¡¢¤½¤Îʸ»ú°ÌÃ֤ȸ½ºß¤Î°ÌÃ֤δÖ
1819 ºï½ü¤Ë¤è¤Ã¤Æ¥Þ¡¼¥«¤Î°ÌÃ֤ϼ«Æ°Åª¤ËÊѹ¹¤µ¤ì¤ë¡£
1822 SELECT ::= '(' 'select' PREDEFINED-SYMBOL ')'
1823 | '(' 'select' INTEGER ')'
1826 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¤Þ¤º¡¢¸½ºß¤Î°ÌÃ֤ξÁ°¤Îʸ»ú¤¬¡¢¸õÊä¥ê¥¹¥È¤¬Éղ䵤ì¤Æ
1827 ¤¤¤ëʸ»úÎó¤Ë°¤¹¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¡£¤½¤¦¤Ç¤¢¤ì¤Ð¡¢¤½¤Îʸ»úÎó¤ò°ú¿ô¤Ë¤è¤Ã
1828 ¤Æ»ØÄꤵ¤ì¤¿¸õÊä¤ËÆþ¤ì´¹¤¨¤ë¡£
1830 Âè°ì¤Î·Á¼°¤Ç¤Ï @c PREDEFINED-SYMBOL ¤òÁ°½Ò¤Î¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤È¤·¤Æ°·¤¤¡¢
1831 ¤½¤ì¤Ë¤è¤Ã¤Æ¸õÊä¥ê¥¹¥ÈÃæ¤Î¿·¤·¤¤¸õÊ䤬»ØÄꤵ¤ì¤ë¡£
1833 ÂèÆó¤Î·Á¼°¤Ç¤Ï @c INTEGER ¤Ï¸õÊ䥤¥ó¥Ç¥Ã¥¯¥¹¤Ç¤¢¤ê¡¢¸õÊä¥ê¥¹¥ÈÃæ¤Î¿·¤·
1840 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¸½ºß¤Î°ÌÃÖ¤ÎÁ°¤Ë¤¢¤ëʸ»úÎó¤ËÉÕ
1841 ²Ã¤µ¤ì¤Æ¤¤¤ë¸õÊä¥ê¥¹¥È¤ò¼¨¤¹¤è¤¦¤Ë»Ø¼¨¤¹¤ë¡£
1847 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ÆþÎϥ᥽¥Ã¥É¥É¥é¥¤¥Ð¤Ë¸½ºß¼¨¤µ¤ì¤Æ¤¤¤ë¸õÊä¥ê¥¹¥È¤ò±£
1851 MOVE ::= '(' 'move' SYMBOL ')'
1852 | '(' 'move' INTEGER ')'
1855 Âè°ì¤Î·Á¼°¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¤½¤ì¤ò¿·¤·¤¤¸½ºß¤Î°ÌÃ֤Ȥ¹¤ë¡£
1857 ÂèÆó¤Î·Á¼°¤Ï @c INTEGER ¤òʸ»ú°ÌÃ֤Ȥ·¤Æ¡¢¤½¤Î°ÌÃÖ¤ò¿·¤·¤¤¸½ºß¤Î°ÌÃÖ¤È
1861 MARK ::= '(' 'mark' SYMBOL ')'
1864 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï @c SYMBOL ¤ò¥Þ¡¼¥«¤È¤·¤Æ¡¢¤½¤ì¤ò¸½ºß¤Î°ÌÃÖ¤ËÀßÄꤹ¤ë¡£
1865 @c SYMBOL ¤Ï @c PREDEFINED-SYMBOL ¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1869 PUSHBACK :: = '(pushback INTEGER)'
1872 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤ÏºÇ¿·¤Î¥¡¼¥¤¥Ù¥ó¥È¤ò¥¤¥Ù¥ó¥È¥¥å¡¼¤ËÌ᤹¡£
1878 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤ÏºÇ¸å¤Î¥¡¼¥¤¥Ù¥ó¥È¤ò¼è¤ê¾Ã¤¹¡£
1881 SHIFT :: = '(' 'shift' STATE-NAME ')'
1884 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¸½ºß¤Î¾õÂÖ¤ò @c STATE-NAME ¤Ë°ÜÆ°¤µ¤»¤ë¡£ @c
1885 STATE-NAME ¤Ï @c STATE-LIST ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1888 CALL ::= '(' 'call' MODULE-NAME FUNCTION ARG * ')'
1890 ARG ::= INTEGER | SYMBOL | MTEXT | PLIST
1893 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï³°Éô¥â¥¸¥å¡¼¥ë @c MODULE-NAME ¤Î´Ø¿ô @c FUNCTION ¤ò¸Æ
1894 ¤Ö¡£@c MODULE-NAME ¤È @c FUNCTION ¤Ï @c MODULE-LIST ¤Ë¸½¤ï¤ì¤ë¤â¤Î¤Ç¤Ê
1897 ´Ø¿ô¤Ï (#MPlist *) ·¿¤Î°ú¿ô¤È¤È¤â¤Ë¸Æ¤Ð¤ì¤ë¡£ºÇ½é¤ÎÍ×ÁǤΥ¡¼¤Ï #Mt ¤Ç
1898 ¤¢¤ê¡¢¤½¤ÎÃͤÏ#MInputContext ·¿¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë¡£ÂèÆó
1899 ¤ÎÍ×ÁǤΥ¡¼¤Ï#Msymbol ¤Ç¤¢¤ê¡¢Ãͤϸ½ºß¤Î¾õÂÖ̾¤Ç¤¢¤ë¡£ @c ARGs ¤Ï»°¤Ä
1900 ÌܰʹߤÎÍ×ÁǤÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤ë¡£¤½¤ì¤é¤ÎÍ×ÁǤΥ¡¼¤Ï¼«Æ°Åª¤Ë·èÄꤵ¤ì
1901 ¤ë¡£@c ARG ¤¬À°¿ôÃͤʤé¤ÐÂбþ¤¹¤ë¥¡¼¤Ï #Minteger ¤Ç¤¢¤ê¡¢@c ARG ¤¬¥·
1902 ¥ó¥Ü¥ë¤Ê¤é¤Ð¡¢Âбþ¤¹¤ë¥¡¼¤Ï #Msymbol¡¢¤Ê¤É¤Î¤è¤¦¤Ë¡£
1904 ´Ø¿ô¤Ï NULL ¤òÊÖ¤¹¤«¡¢¤Þ¤¿¤Ï¹Ô¤¦¤Ù¤¥¢¥¯¥·¥ç¥ó¤Î¥ê¥¹¥È¤òɽ¤¹ (#MPlist
1905 *) ·¿¤ÎÃͤòÊÖ¤µ¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
1908 SET ::= '(' OPERAND SYMBOL1 [ INTEGER | SYMBOL2 ] ')'
1910 OPERAND ::= 'set' | 'add' | 'sub' | 'mul' | 'div'
1913 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï @c SYMBOL1 ¤È @c SYMBOL2 ¤òÊÑ¿ô¤È¤·¤Æ¡¢@c SYMBOL1 ¤Î
1914 Ãͤò°Ê²¼¤Î¤è¤¦¤ËÀßÄꤹ¤ë¡£
1916 @c OPERAND ¤¬ 'set' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃÍ¤Ï @c INTEGER ¤Þ¤¿¤Ï @c
1917 SYMBOL2 ¤ËÀßÄꤵ¤ì¤ë¡£
1919 @c OPERAND ¤¬ 'add' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1920 SYMBOL2 ¤ÎÃͤÀ¤±Áý¤ä¤¹¡£
1922 @c OPERAND ¤¬ 'sub' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1923 SYMBOL2 ¤ÎÃͤÀ¤±¸º¤é¤¹¡£
1925 @c OPERAND ¤¬ 'mul' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃÍ¤Ë @c INTEGER ¤Þ¤¿¤Ï @c
1926 SYMBOL2 ¤ÎÃͤò³Ý¤±¤ë¡£
1928 @c OPERAND ¤¬ 'div' ¤Ê¤é¤Ð¡¢@c SYMBOL1 ¤ÎÃͤò @c INTEGER ¤Þ¤¿¤Ï @c
1929 SYMBOL2 ¤ÎÃͤdzä¤ë¡£
1932 IF ::= '(' 'if' CONDITION ACTION-LIST1 ACTION-LIST2 * ')'
1934 CONDITION ::= '(' OPERAND VAL1 VAL2 ')'
1936 ACTION-LIST1 ::= '(' ACTION * ')'
1938 ACTION-LIST2 ::= '(' ACTION * ')'
1940 OPERAND ::= '=' '<' '>'
1942 VAL1 ::= [ INTEGER1 | SYMBOL1 ]
1944 VAL2 ::= [ INTEGER2 | SYMBOL2 ]
1947 ¤³¤Î¥¢¥¯¥·¥ç¥ó¤Ï¡¢ @c CONDITION ¤¬¿¿¤Ç¤¢¤ì¤Ð @c ACTION-LIST1 ¤ò¼Â¹Ô¤·¡¢
1948 ¤½¤¦¤Ç¤Ê¤±¤ì¤Ð @c ACTION-LIST2 ¤ò (¤â¤·¤¢¤ì¤Ð) ¼Â¹Ô¤¹¤ë¡£
1950 @c SYMBOL1 ¤È @c SYMBOL2 ¤ÏÊÑ¿ô¤È¤·¤Æ°·¤ï¤ì¤ë¡£
1954 @subsection im-seealso SEE ALSO
1956 @ref mim-list "Input Methods provided by the m17n database",
1957 @ref mdbGeneral "mdbGeneral(5)"
1961 @section mdbIM Input Method
1963 @subsection im-description DESCRIPTION
1965 The m17n library provides a driver for input methods that are
1966 dynamically loadable from the m17n database (see @ref m17nInputMethod
1967 @latexonly (P.\pageref{group__m17nInputMethod}) @endlatexonly).
1969 This section describes the data format that defines those input
1972 @subsection im-format SYNTAX and SEMANTICS
1974 The following data format defines an input method. The driver loads
1975 a definition from a file, a stream, etc. A definitions is converted
1976 into the form of plist in the driver.
1979 INPUT-METHOD ::= TITLE MAP-LIST MACRO-LIST ? MODULE-LIST ? STATE-LIST
1981 TITLE ::= '(' 'title' MTEXT ')'
1984 @c MTEXT is a text displayed on the screen when this input method is
1988 MAP-LIST ::= '(' 'map' MAP * ')'
1990 MAP ::= '(' MAP-NAME RULE * ')'
1994 RULE ::= '(' KEYSEQ MAP-ACTION * ')'
1996 KEYSEQ ::= MTEXT | '(' [ SYMBOL | INTEGER ] * ')'
1999 @c SYMBOL in the definitions of @c MAP-NAME must not be @c t nor @c
2002 @c MTEXT in the definition of @c KEYSEQ consists of characters that
2003 can be generated by a keyboard. Therefore @c MTEXT usually contains
2004 only ASCII characters. However, if the input method is intended to be
2005 used, for instance, with a West European keyboard, @c MTEXT may
2006 contain Latin-1 characters.
2008 @c SYMBOL in the definition of @c KEYSEQ must be the return value of
2009 the minput_event_to_key () function.
2011 @c INTEGER in the definition of @c KEYSEQ must be a valid character
2015 MAP-ACTION ::= ACTION
2017 ACTION ::= INSERT | DELETE | SELECT | MOVE | MARK |
2018 | SHOW | HIDE | PUSHBACK | UNDO | SHIFT | CALL
2019 | SET | IF | '(' MACRO-NAME ')'
2021 PREDEFINED-SYMBOL ::=
2022 '@0' | '@1' | '@2' | '@3' | '@4' |
2023 '@5' | '@6' | '@7' | '@8' | '@9' |
2024 '@<' | '@=' | '@>' | '@-' | '@+' | '@[' | '@]'
2027 MACRO-LIST ::= '(' 'macro' MACRO * ')'
2029 MACRO ::= '(' MACRO-NAME MACRO-ACTION * ')'
2031 MACRO-NAME ::= SYMBOL
2033 MACRO-ACTION ::= ACTION
2036 MODULE-LIST ::= '(' 'module' MODULE * ')'
2038 MODULE ::= '(' MODULE-NAME FUNCTION * ')'
2040 MODULE-NAME ::= SYMBOL
2045 Each @c MODULE declares the name of external module (i.e. dynamic
2046 library) and function names exported by the module. If a @c FUNCTION has
2047 name "init", it is called with only the default arguments (see the
2048 section about @c CALL) when an input context is created for the input
2049 method. If a @c FUNCTION has name "fini", it is called with only the
2050 default arguments when an input context is destroyed.
2053 STATE-LIST ::= '(' 'state' STATE * ')'
2055 STATE ::= '(' STATE-NAME BRANCH * ')'
2057 STATE-NAME ::= SYMBOL
2059 BRANCH ::= '(' MAP-NAME BRANCH-ACTION * ')'
2060 | '(' nil BRANCH-ACTION * ')'
2061 | '(' t BRANCH-ACTION * ')'
2064 In the first form of @c BRANCH, @c MAP-NAME must be an item that appears
2065 in @c MAP. In this case, if a key sequence matching one of @c
2066 KEYSEQs of @c MAP-NAME is typed, @c BRANCH-ACTIONs are executed.
2068 In the second form of @c BRANCH, @c BRANCH-ACTIONs are executed if a
2069 key sequence that doesn't match any of @c Branch's of the current
2072 In the third form of @c BRANCH, @c BRANCH-ACTIONs are executed if we
2073 shift to the current state after handling all typed keys. If the
2074 current state is the initial state, @c BRANCH-ACTIONs are executed
2075 just after an input context of the input method is created.
2078 BRANCH-ACTION ::= ACTION
2081 An input method has the following two lists of symbols.
2086 A marker is a symbol indicating a character position in the preediting
2087 text. The @c MARK action assigns a position to a marker. The
2088 position of a marker is referred by the @c MOVE and the @c DELETE actions.
2092 A variable is a symbol associated with an integer value. The value of
2093 a variable is set by the @c SET action, and is referred by the @c SET,
2094 the @c INSERT, and the @c IF actions. All variables are implicitly
2095 initialized to zero.
2099 Each @c PREDEFINED-SYMBOL has a special meaning when used as a marker.
2102 <li> @c @@0, @c @@1, @c @@2, @c @@3, @c @@4, @c @@5, @c @@6, @c @@7, @c @@8, @c @@9
2104 The 0th, 1st, 2nd, ... 9th position respectively.
2106 <li> @c @@<, @c @@=, @c @@>
2108 The first, the current, and the last position.
2112 The previous and the next position.
2116 The previous and the next position where a candidate list changes.
2119 Some of the @c PREDEFINED-SYMBOL has a special meaning when used as a candidate
2120 index in the @c SELECT action.
2124 <li> @c @@<, @c @@=, @c @@>
2126 The first, the current, and the last candidate of the current candidate group.
2130 The previous candidate. If the current candidate is the first one in
2131 the current candidate group, then it means the last candidate in the
2132 previous candidate group.
2136 The next candidate. If the current candidate is the last one in the
2137 current candidate group, then it means the first candidate in the next
2142 The candidate in the previous and the next candidate group having the same
2143 candidate index as the current one.
2146 The arguments and the behavior of each action are listed below.
2149 INSERT ::= '(' 'insert' MTEXT ')'
2152 | '(' 'insert' SYMBOL ')'
2153 | '(' 'insert' '(' CANDIDATES * ')' ')'
2154 | '(' CANDIDATES * ')'
2156 CANDIDATES ::= MTEXT | '(' MTEXT * ')'
2159 The first and second forms insert @c MTEXT before the current position.
2161 The third form inserts the character @c INTEGER before the current
2164 The fourth form treats @c SYMBOL as a variable, and inserts its value
2165 (if it is a valid character code) before the current position.
2167 In the fifth and sixth forms, each @c CANDIDATES represents a
2168 candidate group, and each element of @c CANDIDATES represents a
2169 candidate, i.e. if @c CANDIDATES is an M-text, the candidates are the
2170 characters in the M-text; if @c CANDIDATES is a list of M-texts, the
2171 candidates are the M-texts in the list.
2173 These forms insert the first candidate before the current position.
2174 The inserted string is associated with the list of candidates and
2175 the information indicating the currently selected candidate.
2177 The marker positions affected by the insertion are automatically relocated.
2180 DELETE ::= '(' 'delete' SYMBOL ')'
2181 | '(' 'delete' INTEGER ')'
2184 The first form treats @c SYMBOL as a marker, and deletes characters
2185 between the current position and the marker position.
2187 The second form treats @c INTEGER as a character position, and deletes
2188 characters between the current position and the character position.
2190 The marker positions affected by the deletion are automatically relocated.
2193 SELECT ::= '(' 'select' PREDEFINED-SYMBOL ')'
2194 | '(' 'select' INTEGER ')'
2197 This action first checks if the character just before the current position
2198 belongs to a string that is associated with a candidate list. If it is,
2199 the action replaces that string with a candidate specified by the
2202 The first form treats @c PREDEFINED-SYMBOL as a candidate index (as
2203 described above) that specifies a new candidate in the candidate list.
2205 The second form treats @c INTEGER as a candidate index that specifies a
2206 new candidate in the candidate list.
2212 This actions instructs the input method driver to display a candidate
2213 list associated with the string before the current position.
2219 This action instructs the input method driver to hide the currently
2220 displayed candidate list.
2223 MOVE ::= '(' 'move' SYMBOL ')'
2224 | '(' 'move' INTEGER ')'
2227 The first form treats @c SYMBOL as a marker, and makes the marker
2228 position be the new current position.
2230 The second form treats @c INTEGER as a character position, and makes
2231 that position be the new current position.
2234 MARK ::= '(' 'mark' SYMBOL ')'
2237 This action treats @c SYMBOL as a marker, and sets its position to the
2238 current position. @c SYMBOL must not be a @c PREDEFINED-SYMBOL.
2242 PUSHBACK :: = '(pushback INTEGER)'
2245 This action pushes back the latest @c INTEGER number of key events to the event queue.
2251 This action cancels the last key event.
2254 SHIFT :: = '(' 'shift' STATE-NAME ')'
2257 This action shifts the current state to @c STATE-NAME. @c
2258 STATE-NAME must appear in @c STATE-LIST.
2261 CALL ::= '(' 'call' MODULE-NAME FUNCTION ARG * ')'
2263 ARG ::= INTEGER | SYMBOL | MTEXT | PLIST
2266 This action calls the function @c FUNCTION of external module @c
2267 MODULE-NAME. @c MODULE-NAME and @c FUNCTION must appear in @c
2270 The function is called with an argument of the type (#MPlist *). The
2271 key of the first element is #Mt and its value is a pointer to an
2272 object of the type #MInputContext. The key of the second element is
2273 #Msymbol and its value is the current state name. @c ARGs are used as
2274 the value of the third and later elements. Their keys are determined
2275 automatically; if an @c ARG is an integer, the corresponding key is
2276 #Minteger; if an @c ARG is a symbol, the corresponding key is
2279 The function must return NULL or a value of the type (#MPlist *) that
2280 represents a list of actions to take.
2283 SET ::= '(' OPERAND SYMBOL1 [ INTEGER | SYMBOL2 ] ')'
2285 OPERAND ::= 'set' | 'add' | 'sub' | 'mul' | 'div'
2288 This action treats @c SYMBOL1 and @c SYMBOL2 as variables and sets the
2289 value of @c SYMBOL1 as below.
2291 If @c OPERAND is 'set', it sets the value of @c SYMBOL1 to @c INTEGER or the
2292 value of @c SYMBOL2.
2294 If @c OPERAND is 'add', it increments the value of @c SYMBOL1 by @c INTEGER
2295 or the value of @c SYMBOL2.
2297 If @c OPERAND is 'sub', it decrements the value of @c SYMBOL1 by @c INTEGER
2298 or the value of @c SYMBOL2.
2300 If @c OPERAND is 'mul', it multiplies the value of @c SYMBOL1 by @c INTEGER
2301 or the value of @c SYMBOL2.
2303 If @c OPERAND is 'div', it divides the value of @c SYMBOL1 by @c INTEGER or
2304 the value of @c SYMBOL2.
2307 IF ::= '(' CONDITION ACTION-LIST1 ACTION-LIST2 * ')'
2309 CONDITION ::= OPERAND VAL1 VAL2
2311 ACTION-LIST1 ::= '(' ACTION * ')'
2313 ACTION-LIST2 ::= '(' ACTION * ')'
2315 OPERAND ::= '=' '<' '>'
2317 VAL1 ::= [ INTEGER1 | SYMBOL1 ]
2319 VAL2 ::= [ INTEGER2 | SYMBOL2 ]
2322 This action performs actions in @c ACTION-LIST1 if @c CONDITION is
2323 true, and performs @c ACTION-LIST2 (if any) otherwise.
2325 @c SYMBOL1 and @c SYMBOL2 are treated as variables.
2329 @subsection im-example1 EXAMPLE 1
2331 This is a very simple example for inputting Latin characters with
2332 diacritical marks (acute and cedilla). For instance, when you type:
2334 Comme'die-Franc,ais, chic,,
2339 Commédie-Français, chic,
2344 \hskip5mm\texttt{\footnotesize Comm\'{e}die-Fran\c{c}ais, chic,}
2348 The definition of the input method is very simple as below, and it is
2349 quite straight forward to extend it to cover all Latin characters.
2353 (title "latin-postfix")
2356 ("a'" ?á) ("e'" ?é) ("i'" ?í) ("o'" ?ó) ("u'" ?ú) ("c," ?ç)
2357 ("A'" ?Á) ("E'" ?É) ("I'" ?Í) ("O'" ?Ó) ("U'" ?Ú) ("C," ?Ç)
2358 ("a''" "a'") ("e''" "e'") ("i''" "i'") ("o''" "o'") ("u''" "u'")
2360 ("A''" "A'") ("E''" "E'") ("I''" "I'") ("O''" "O'") ("U''" "U'")
2369 \texttt{\footnotesize
2370 \hskip2mm(title "latin-postfix")\\
2373 \hskip6mm ("a'" ?\'{a}) ("e'" ?\'{e}) ("i'" ?\'{i}) ("o'" ?\'{o})
2374 ("u'" ?\'{u}) ("c," ?\c{c})\\
2375 \hskip6mm ("A'" ?\'{A}) ("E'" ?\'{E}) ("I'" ?\'{I}) ("O'" ?\'{O})
2376 ("U'" ?\'{U}) ("C," ?\c{C})\\
2377 \hskip6mm ("a''" "a'") ("e''" "e'") ("i''" "i'") ("o''" "o'") ("u''" "u'")\\
2378 \hskip6mm ("c,," "c,")\\
2379 \hskip6mm ("A''" "A'") ("E''" "E'") ("I''" "I'") ("O''" "O'") ("U''" "U'")\\
2380 \hskip6mm ("C,," "C,")))\\
2383 \hskip6mm (trans)))}
2387 @subsection im-example2 EXAMPLE 2
2389 This example is for inputting Unicode characters by typing C-u
2390 (Control-u) followed by four hexadecimal numbers. For instance, when
2391 you type ("^u" means Control-u):
2393 ^u2190^u2191^u2192^u2193
2395 you will get this (Unicode arrow symbols):
2400 The definition utilizes @c SET and @c IF commands as below:
2407 ("0" ?0) ("1" ?1) ... ("9" ?9) ("a" ?A) ("b" ?B) ... ("f" ?F)))
2410 (starter (set code 0) (set count 0) (shift unicode)))
2416 (mul code 16) (add code this)
2419 ((delete @<) (insert code) (shift init))))))
2422 @subsection im-example3 EXAMPLE 3
2424 This example is for inputting Chinese characters by typing PinYin key
2427 For instance, when you type:
2436 The definition utilizes @c CANDIDATE and @c SELECT commands as below.
2437 Note that this is just an example, and it ignores such important key
2444 ;; The initial character of Pinyin.
2446 ("a") ("b") ... ("h") ("j") ... ("t") ("w") ("x") ("y") ("z"))
2448 ;; Big table of Pinyin vs the corresponding Chinese characters.
2451 ("bei" ("被北备背悲辈杯倍贝碑" ...))
2452 ("hao" ("好号毫豪浩耗皓嚎昊郝" ...))
2453 ("jing" ("经京精境警竟静惊景敬" ...))
2454 ("ni" ("你呢尼泥逆倪匿拟腻妮" ...))
2456 ;; Typing 1, 2, ..., 0 selects the 0th, 1st, ..., 9th candidate.
2458 ("1" (select 0)) ("2" (select 1)) ... ("9" (select 8)) ("0" (select 9))))
2462 ;; When an initial character of Pinyin is typed, re-handle it in
2463 ;; "main" state. Anything else is just produced as is.
2464 (starter (show) (pushback 1) (shift main)))
2467 ;; When a complete Pinyin sequence is typed, shift to "select" state
2468 ;; to allow users to select one from the candidates.
2469 (pinyin (shift select))
2471 ;; When anything else is typed, produce the current candidate (if
2472 ;; any), and re-handle the last input in "init" state.
2473 (nil (hide) (shift init)))
2476 ;; When a number is typed, select the corresponding canidate,
2477 ;; produce it, and shift to "init" state.
2478 (choose (hide) (shift init))
2480 ;; When anything else is typed, produce the current candidate,
2481 ;; and re-handle the last input in "init" state.
2482 (nil (hide) (shift init))))
2488 \fbox{This example is readable only in the documentation of HTML version.}
2495 @subsection im-seealso SEE ALSO
2497 @ref mim-list "Input Methods provided by the m17n database",
2498 @ref mdbGeneral "mdbGeneral(5)"