*** 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 @endverbatim    
34
35 @c SCRIPT is a symbol of script name (e.g. latin, han) or @c nil.  @c
36 LANGUAGE is a two-letter symbol of language name code defined by ISO
37 639 (e.g. ja, zh) or @c nil.
38
39 @c FONT-SPEC is to specify properties of a font.  @c FOUNDRY to @c
40 REGISTRY are symbols corresponding to #Mfoundry to #Mregistry property
41 of a font.  See @ref m17nFont for the meaning of each property.
42
43 @c FLT-NAME is a name of Font Layout Table (@ref mdbFLT).
44
45 @section fontset-example EXAMPLE
46
47 This is an example of @c PER_SCRIPT.
48
49 @verbatim
50 (han
51   (ja
52     ((jisx0208.1983-0)))
53   (zh
54     ((gb2312.1980-0)))
55   (nil
56     ((big5-0))))
57 @endverbatim
58
59 It instructs the font selector to use a font of registry
60 "jisx0208.1983-0" for a "han" character (i.e. a character whose
61 #Mscript property is 'han') if the character has #Mlanguage text
62 propert "ja" in an M-text and the character is in the repertories of
63 such fonts.  Otherwise, try a font of registry "gb2312.1980-0" or
64 "big5-0".  If that "han" character does not have #Mlanguage text
65 property, try all three fonts.
66
67 See the function mdraw_text () for the detail of how a font is
68 selected.
69 */
70
71 /* 
72 Copyright (C) 2003, 2004
73   National Institute of Advanced Industrial Science and Technology (AIST)
74   Registration Number H15PRO112
75
76 This file is part of the m17n database; a sub-part of the m17n
77 library.
78
79 The m17n library is free software; you can redistribute it and/or
80 modify it under the terms of the GNU Lesser General Public License
81 as published by the Free Software Foundation; either version 2.1 of
82 the License, or (at your option) any later version.
83
84 The m17n library is distributed in the hope that it will be useful,
85 but WITHOUT ANY WARRANTY; without even the implied warranty of
86 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
87 Lesser General Public License for more details.
88
89 You should have received a copy of the GNU Lesser General Public
90 License along with the m17n library; if not, write to the Free
91 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
92 02111-1307, USA.
93 */