From 021ab1a22c30d1edf07b79e6c99d2adef45e7476 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 25 Jun 2003 06:40:41 +0000 Subject: [PATCH] *** empty log message *** --- data-usr/dbformat.txt | 80 ++++++++++++++++++++++++---- data-usr/flt.txt | 132 +++++++++++++++++++++++------------------------ utils/refman-filter.sed | 7 +-- 3 files changed, 137 insertions(+), 82 deletions(-) diff --git a/data-usr/dbformat.txt b/data-usr/dbformat.txt index bd6c345..3a8ecc1 100644 --- a/data-usr/dbformat.txt +++ b/data-usr/dbformat.txt @@ -1,8 +1,4 @@ -/*** @addtogroup m17nDatabase */ -//// -/*** @{ */ -//// -/***@defgroup m17nDatabaseFormat DatabaseFormat +/***@page m17nDatabaseFormat DatabaseFormat This section describes the formats of predefined @e plist @e type data in the m17n database. @@ -103,8 +99,6 @@ of this syntax from the database file. 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 @@ -173,14 +167,80 @@ this @c PER-FONT-INFO: 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 \. 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 +\. The plist format of the data is as +follows: + @verbinclude flt.txt @section im Input Method -@verbinclude im.txt */ +@verbinclude im.txt + +*/ -//// -/*** @} */ //// diff --git a/data-usr/flt.txt b/data-usr/flt.txt index a75a8ad..7d45f0d 100644 --- a/data-usr/flt.txt +++ b/data-usr/flt.txt @@ -1,67 +1,65 @@ -;; 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: -;; -;; LANGSYS-TAG is OTF's Language System name (four letters) listed at: -;; -;; 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: + + LANGSYS-TAG is OTF's Language System name (four letters) listed at: + + 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. + diff --git a/utils/refman-filter.sed b/utils/refman-filter.sed index fd8421c..73f41be 100644 --- a/utils/refman-filter.sed +++ b/utils/refman-filter.sed @@ -1,6 +1,3 @@ /documentclass/ s/a4paper/a4paper,twoside/ -/The M17N Library Module Index/,/files/ d -/The M17N Library File Documentation/,/printindex/ d -$ i \ -\\printindex - +/The M17N Library Module Index/,/pages/ d +/The M17N Library File Documentation/,/textprop_8c/ d -- 1.7.10.4