*** empty log message ***
[m17n/m17n-db.git] / FORMATS / Fontset.txt
1 /* Copyright (C) 2003, 2004
2      National Institute of Advanced Industrial Science and Technology (AIST)
3      Registration Number H15PRO112
4    See the end for copying conditions.  */
5
6 /***en
7
8 @page mdbFontset Fontset
9
10 @section fontset-description DESCRIPTION
11
12 The m17n library loads a fontset definition from the m17n database by
13 the tags \<fontset, FONTSET-NAME\>.  The plist format of the data is
14 as follows:
15
16 @verbatim
17 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
18
19 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
20
21 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
22
23 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
24
25 FALLBACK ::= FONT-SPEC-ELEMENT
26
27 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
28
29 FONT-SPEC ::=
30      '(' [ FOUNDRY FAMILY
31            [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
32          REGISTRY
33          [ OTF-SPEC ] [ LANG-SPEC ] ')'
34 @endverbatim    
35
36 @c SCRIPT is a symbol of script name (e.g. latin, han) or @c nil.  @c
37 LANGUAGE is a two-letter symbol of language name code defined by ISO
38 639 (e.g. ja, zh) or @c nil.
39
40 @c FONT-SPEC is to specify properties of a font.  @c FOUNDRY to @c
41 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
42 of a font.  See @ref m17nFont for the meaning of each property.
43
44 @c OTF-SPEC is a symbol specifing the required OTF features.  The
45 symbol name has the following syntax.
46
47 @verbatim
48   OTF-SPEC-NAME ::= ':otf=' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
49
50   SCRIPT ::= SYMBOL
51   LANGSYS ::= '/' SYMBOL
52
53   GSUB-FEATURES ::= '=' FEATURE-LIST ?
54
55   GPOS-FEATURES ::= '+' FEATURE-LIST ?
56
57   FEATURE-LIST ::= '~' ? FEATURE ( ',' '~' ? FEATURE ',' )
58
59 @endverbatim
60
61 Here, @c FEATURE is a four-letter Open Type feature.
62
63 @c LANG-SPEC is a symbol specifying the required language support.
64 The symbol name has the following syntax.
65
66 @verbatim
67   LANG-SPEC-NAME ::= ':lang=' LANG
68 @endverbatim
69
70 Here, @c LANG is a two or three-letter ISO-639 language code.
71
72 @c FLT-NAME is a name of Font Layout Table (@ref mdbFLT).
73
74 @section fontset-example EXAMPLE
75
76 This is an example of @c PER_SCRIPT.
77
78 @verbatim
79 (han
80   (ja
81     ((jisx0208.1983-0)))
82   (zh
83     ((gb2312.1980-0)))
84   (nil
85     ((big5-0))))
86 @endverbatim
87
88 It instructs the font selector to use a font of registry
89 "jisx0208.1983-0" for a "han" character (i.e. a character whose
90 #Mscript property is 'han') if the character has #Mlanguage text
91 property "ja" in an M-text and the character is in the repertories of
92 such fonts.  Otherwise, try a font of registry "gb2312.1980-0" or
93 "big5-0".  If that "han" character does not have #Mlanguage text
94 property, try all three fonts.
95
96 See the function mdraw_text () for the detail of how a font is
97 selected.
98 */
99
100 /* 
101 Copyright (C) 2003, 2004
102   National Institute of Advanced Industrial Science and Technology (AIST)
103   Registration Number H15PRO112
104
105 This file is part of the m17n database; a sub-part of the m17n
106 library.
107
108 The m17n library is free software; you can redistribute it and/or
109 modify it under the terms of the GNU Lesser General Public License
110 as published by the Free Software Foundation; either version 2.1 of
111 the License, or (at your option) any later version.
112
113 The m17n library is distributed in the hope that it will be useful,
114 but WITHOUT ANY WARRANTY; without even the implied warranty of
115 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
116 Lesser General Public License for more details.
117
118 You should have received a copy of the GNU Lesser General Public
119 License along with the m17n library; if not, write to the Free
120 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
121 Boston, MA 02110-1301, USA.
122 */