-/*** @addtogroup m17nDatabase */
-////
-/*** @{ */
-////
-/***@defgroup m17nDatabaseFormat DatabaseFormat
+/***@page m17nDatabaseFormat DatabaseFormat
This section describes the formats of predefined @e plist @e type data
in the m17n database.
Here after we describes the plist format of each data by this syntax.
-@section fontset Fontset
-
@section fontenc Font Encoding
The m17n library loads information about the encoding of each font
means that, to use a font of registry "devanagari-cdac" with a
specific size, we have to open an 1.5 times bigger one.
+@section fontset Fontset
+
+The m17n library loads a fontset definition from the m17n database by
+the tags \<fontset, FONTSET-NAME\>. The plist format of the data is
+as follows:
+
+@verbatim
+FONTSET ::=
+ '(' PER-SCRIPT + ')'
+
+PER-SCRIPT ::=
+ '(' SCRIPT PER-LANGUAGE + ')'
+
+PER-LANGUAGE ::=
+ '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
+
+FONT-SPEC-ELEMENT ::=
+ '(' FONT-SPEC [ FLT-NAME ] ')'
+
+FONT-SPEC ::=
+ '('
+ [ FOUNDRY FAMILY [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ] ] ] ] ] REGISTRY
+ ')'
+@endverbatim
+
+@c SCRIPT is a symbol of script name (e.g. latin, han), or @c nil. @c
+LANGUAGE is a two-letter symbol of language name code defined by ISO
+639 (e.g. ja, zh) or @c nil. The meanings of @c FOUNDRY to @c
+REGISTRY are the same as @e Font @e Encoding. @c FLT-NAME is a name
+of @ref flt.
+
+For instance, this @c PER_SCRIPT:
+
+@verbatim
+(han
+ (ja
+ ((jisx0208.1983-0)))
+ (zh
+ ((gb2312.1980-0)))
+ (nil
+ ((big5-0))))
+@endverbatim
+
+instructs the rendering engine to use a font of registry
+"jisx0208.1983-0" for a "han" character that has @c Mlanguage text
+propert "ja" if the character is in the repertories of such fonts.
+Otherwise, try a font of registry "gb2312.1980-0" or "big5-0". If a
+"han" character doesn not have @c Mlangauge text property, try all
+three fonts.
+
@section flt Font Layout Table
+Usually, the rendering engine converts character codes of a text into
+glyph codes one by one by consulting information about encoding of
+each selected font. But, for rendering a text that requires
+complicated layouting (e.g. Thai and Indic), such an one to one
+conversion is not sufficient. In addition, some glyphs must be
+shifted 2-dimensionally on the screen. For such a case, a font layout
+table (FLT in short) must be used.
+
+A FLT can contain all the information in OpenType Layout Table (CMAP,
+GSUB, and GPOS) in addition to the information about how to extract a
+grapheme cluster and how to re-order characters.
+
+The m17n library loads a FLT from the m17n database by the tags
+\<font, layouter, FLT-NAME\>. The plist format of the data is as
+follows:
+
@verbinclude flt.txt
@section im Input Method
-@verbinclude im.txt */
+@verbinclude im.txt
+
+*/
-////
-/*** @} */
////
-;; FILE-FORMAT:
-;; '('
-;; CATEGORY-TABLE GENERATOR
-;; ( CATEGORY-TABLE ? GENERATOR ) *
-;; ')'
-;;
-;; CATEGORY-TABLE ::=
-;; '(' 'category' CATEGORY-SPEC + ')'
-;;
-;; CATEGORY-SPEC ::=
-;; '(' CODE CATEGORY-CODE ')'
-;; |
-;; '(' CODE CHAR-CODE CATEGORY-CODE ')'
-;;
-;; CATEGORY-CODE ::=
-;; [ '?A' .. '?Z' '?a' .. '?z' ]
-;;
-;; GENERATOR ::=
-;; '(' 'generator' REGEX-RULE RULE-DEF * ')'
-;;
-;; RULE-DEF ::=
-;; '(' RULE-NAME ( REGEXP-RULE | MATCH-RULE | MAP-RULE ) ')'
-;;
-;; REGEXP-RULE ::=
-;; '(' REGEXP RULE-SEQ ')' | RULE-NAME
-;; MATCH-RULE ::=
-;; '(' MATCH-IDX RULE-SEQ ')' | RULE-NAME
-;;
-;; RULE-SEQ ::=
-;; '(' ( REGEXP-RULE | MATCH-RULE | MAP-RULE | PREDEFINED ) ')'
-
-;; PREDEFIND ::= PREDEFIND-SIMLE | PREDEFIND-OTF
-;;
-;; PREDEFIND-SIMLE ::= '=' | '*' | '<' | '>' | '|'
-;;
-;; PREDEFIND-OTF ::= 'otf:SCRIPT-TAG[:LANGSYS-TAG]'
-;; where
-;; SCRIPT-TAG is OTF's ScriptTag name (four letters) listed at:
-;; <http://www.microsoft.om/typograph/otspec/scripttags.htm>
-;; LANGSYS-TAG is OTF's Language System name (four letters) listed at:
-;; <http://www.microsoft.om/typograph/otspec/languagetags.htm>
-;; ex: 'otf:deva'
-;;
-;; MAP-RULE ::=
-;; '(' ( SEQ-TO-SEQ | RANGE-TO-CODE ) + ')' | RULE-NAME
-;;
-;; SEQ-TO-SEQ ::=
-;; '(' CODE + '-1' ( COMPOSITION-RULE ? CODE ) * ')'
-;; RANGE-TO-CODE ::=
-;; '(' '(' CODE CODE ')' COMPOSITION-RULE ? CODE ')'
-;;
-;; COMPOSITION-RULE ::= 'VHOVH'
-;; where V ::= ( 't' | 'c' | 'b' | 'B' )
-;; H ::= ( 'l' | 'c' | 'r' )
-;; O ::= ( '.' | XOFF | XOFF ? YOFF )
-;; XOFF ::= ('+' | '-') DIGITS
-;; YOFF ::= ('<' | '>') DIGITS
-;; Ex: 'tc+bc', 'Bl-10<20Br'
-;;
-;; Semantics of predefiend commands:
-;;
-;; '*': repeat the previous command if the command was successful.
-;; '<': start grapheme cluster
-;; '>': end grapheme cluster
-;; '|': produce a special glyph whose code has category-code ' '.
-;; '=': use the first glyph of the current run as is.
-;;
+FONT-LAYOUT-TABLE ::=
+ '(' CATEGORY-TABLE GENERATOR ( CATEGORY-TABLE ? GENERATOR ) * ')'
+
+CATEGORY-TABLE ::=
+ '(' 'category' CATEGORY-SPEC + ')'
+
+CATEGORY-SPEC ::=
+ '(' ( CODE | CODE-FROM CODE-TO ) CATEGORY-CODE ')'
+
+CATEGORY-CODE ::=
+ [ '?A' | ... | '?Z' | '?a' | ... | '?z' ]
+
+GENERATOR ::=
+ '(' 'generator' RULE RULE-DEF * ')'
+
+RULE-DEF ::=
+ '(' RULE-NAME RULE ')'
+
+RULE ::=
+ REGEXP-RULE | MATCH-RULE | MAP-RULE | PREDEFINED-RULE | OTF-RULE
+
+REGEXP-RULE ::=
+ '(' REGEXP RULE * ')' | RULE-NAME
+
+MATCH-RULE ::=
+ '(' MATCH-IDX RULE * ')' | RULE-NAME
+
+PREDEFINED-RULE ::=
+ '=' | '*' | '<' | '>' | '|'
+
+OTF-URLE ::=
+ 'otf:SCRIPT-TAG[:LANGSYS-TAG]'
+ where
+ SCRIPT-TAG is OTF's ScriptTag name (four letters) listed at:
+ <http://www.microsoft.om/typograph/otspec/scripttags.htm>
+ LANGSYS-TAG is OTF's Language System name (four letters) listed at:
+ <http://www.microsoft.om/typograph/otspec/languagetags.htm>
+ Example: 'otf:deva'
+
+MAP-RULE ::=
+ '(' ( SEQ-TO-SEQ | RANGE-TO-CODE ) + ')' | RULE-NAME
+
+SEQ-TO-SEQ ::=
+ '(' CODE + '-1' ( COMBINING-SPEC ? CODE ) * ')'
+
+RANGE-TO-CODE ::=
+ '(' '(' CODE-FROM CODE-TO ')' COMBINING-SPEC ? CODE ')'
+
+COMBINING-SPEC ::=
+ 'VHOVH'
+ where V ::= ( 't' | 'c' | 'b' | 'B' )
+ H ::= ( 'l' | 'c' | 'r' )
+ O ::= ( '.' | XOFF | YOFF XOFF ? )
+ XOFF ::= ('<' | '>') DIGITS
+ YOFF ::= ('+' | '-') DIGITS
+ Example: 'tc+bc', 'Bl-10<20Br'
+
+Semantics of PREDEFINED-RULE:
+
+ '*': repeat the previous command if the command was successful.
+ '<': start grapheme cluster
+ '>': end grapheme cluster
+ '|': produce a special glyph whose code has category-code ' '.
+ '=': use the first glyph of the current run as is.
+