X-Git-Url: http://git.chise.org/gitweb/?p=m17n%2Fm17n-docs.git;a=blobdiff_plain;f=data-usr%2Fdbformat.txt;h=0ad20fbad01bdcdc943aef23ca0bd1401367ec76;hp=473f5c25f310599cfaf73289a6e28f4bed25b0bf;hb=d5b639418e6f1532218a9ec58738290bd8f87322;hpb=ae22060bce08f3848bec92b756e14d37dc1062da diff --git a/data-usr/dbformat.txt b/data-usr/dbformat.txt index 473f5c2..0ad20fb 100644 --- a/data-usr/dbformat.txt +++ b/data-usr/dbformat.txt @@ -1,31 +1,31 @@ -/***@page m17nDatabaseFormat DatabaseFormat +/***@page m17nDatabaseFormat Data Format of the m17n database -This section describes the data formats used in the m17n database. +This section describes formats of data in the m17n database. @section dbformat General format -The mdatabase_load () function receives a set of tags and returns the -contents of database in the form of plist. The keys of the returned -plist are limited to Minteger, Msymbol, -Mtext, and Mplist. The type of the value is -unambiguously determined by the corresponding key. If the key is -Minteger, the value is an integer. If the key is -Msymbol, the value is a symbol. And so on. - -A number of expressions are possible to represent a -plist. For instance, we can use the form (K1:V1, K2:V2, -... ,Kn:Vn) to represent a plist whose first property key and -value are K1 and V1, second key and value are K2 and V2, and so on. -However, we can use a simpler expression here because the types of -plists used in the m17n database are fairly restricted. - -Hereafter, we use an expression, which is similar to -S-expression, to represent a plist. (Actually, the default database -loader of the m17n library is designed to read data files written in -this expression.) - -The expression consists of one or more elements. Each -element represents a property, i.e. a single element of a plist. +The mdatabase_load () function returns the data specified by tags in +the form of plist if the first tag is not @c Mchartable nor @c +Mcharset. The keys of the returned plist are limited to +Minteger, Msymbol, Mtext, and +Mplist. The type of the value is unambiguously determined by +the corresponding key. If the key is Minteger, the value is +an integer. If the key is Msymbol, the value is a symbol. +And so on. + +A number of expressions are possible to represent a plist. For +instance, we can use the form (K1:V1, K2:V2, ..., Kn:Vn) to +represent a plist whose first property key and value are K1 and V1, +second key and value are K2 and V2, and so on. However, we can use a +simpler expression here because the types of plists used in the m17n +database are fairly restricted. + +Hereafter, we use an expression, which is similar to S-expression, to +represent a plist. (Actually, the default database loader of the m17n +library is designed to read data files written in this expression.) + +The expression consists of one or more elements. Each element +represents a property, i.e. a single element of a plist. Elements are separated by one or more whitespaces, i.e. a space (code 32), a tab (code 9), or a newline (code 10). Comments begin @@ -52,7 +52,7 @@ For instance, the element 0xA0 represents a property whose value is An element that matches the regular expression [^-0-9(]([^\\()]|\\.)+ represents a property whose key is - Msymbol. In the element, \\t , \\n, + Msymbol. In the element, \\t, \\n, \\r, and \\e are replaced with tab (code 9), newline (code 10), carriage return (code 13), and escape (code 27) respectively. Other characters following a backslash is interpreted @@ -138,14 +138,15 @@ XLFD font name fields. Omitted symbols are regarded as @c nil, and should be applied to all fonts whose family is "alice0 lao", and registry is "iso8859-1". -@c ENCODING is a charset symbol. A font matching @c FONT-SPEC -supports all characters of the charset, and a character code is mapped -to the corresponding glyph code of the font by this charset. +@c ENCODING is a symbol representing a charset. A font matching @c +FONT-SPEC supports all characters of the charset, and a character code +is mapped to the corresponding glyph code of the font by this charset. + @section fontsize Font Resizing In some case, a font contains incorrect information about its size -(typically in the case of a hacked TrueType font), and results in a +(typically in the case of a hacked TrueType font), which results in a bad text layout when such a font is used in combination with the other fonts. To overcome this problem, the m17n library loads information about font-size correction from the m17n database by the tags \. The plist format of the data is as