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. */
8 @page mdbFontset Fontset
10 @section fontset-description DESCRIPTION
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
17 FONTSET ::= PER-SCRIPT * PER-CHARSET * FALLBACK *
19 PER-SCRIPT ::= '(' SCRIPT PER-LANGUAGE + ')'
21 PER-LANGUAGE ::= '(' LANGUAGE FONT-SPEC-ELEMENT + ')'
23 PER-CHARSET ::= '(' CHARSET FONT-SPEC-ELEMENT + ')'
25 FALLBACK ::= FONT-SPEC-ELEMENT
27 FONT-SPEC-ELEMENT ::= '(' FONT-SPEC [ FLT-NAME ] ')'
31 [ WEIGHT [ STYLE [ STRETCH [ ADSTYLE ]]]]]
33 [ OTF-SPEC ] [ LANG-SPEC ] ')'
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.
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.
44 @c OTF-SPEC is a symbol specifing the required OTF features. The
45 symbol name has the following syntax.
48 OTF-SPEC-NAME ::= ':otf=' SCRIPT LANGSYS ? GSUB-FEATURES ? GPOS-FEATURES ?
51 LANGSYS ::= '/' SYMBOL
53 GSUB-FEATURES ::= '=' FEATURE-LIST ?
55 GPOS-FEATURES ::= '+' FEATURE-LIST ?
57 FEATURE-LIST ::= '~' ? FEATURE ( ',' '~' ? FEATURE ',' )
61 Here, @c FEATURE is a four-letter Open Type feature.
63 @c LANG-SPEC is a symbol specifying the required language support.
64 The symbol name has the following syntax.
67 LANG-SPEC-NAME ::= ':lang=' LANG
70 Here, @c LANG is a two or three-letter ISO-639 language code.
72 @c FLT-NAME is a name of Font Layout Table (@ref mdbFLT).
74 @section fontset-example EXAMPLE
76 This is an example of @c PER_SCRIPT.
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.
96 See the function mdraw_text () for the detail of how a font is
101 Copyright (C) 2003, 2004
102 National Institute of Advanced Industrial Science and Technology (AIST)
103 Registration Number H15PRO112
105 This file is part of the m17n database; a sub-part of the m17n
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.
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.
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.