Imported Upstream version 2.11.93
[platform/upstream/fontconfig.git] / doc / fcfile.sgml
1 <!--
2    fontconfig/doc/func.sgml
3   
4    Copyright © 2003 Keith Packard
5   
6    Permission to use, copy, modify, distribute, and sell this software and its
7    documentation for any purpose is hereby granted without fee, provided that
8    the above copyright notice appear in all copies and that both that
9    copyright notice and this permission notice appear in supporting
10    documentation, and that the name of the author(s) not be used in
11    advertising or publicity pertaining to distribution of the software without
12    specific, written prior permission.  The authors make no
13    representations about the suitability of this software for any purpose.  It
14    is provided "as is" without express or implied warranty.
15   
16    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22    PERFORMANCE OF THIS SOFTWARE.
23  -->
24     <refentry id="FcFileScan">
25         <refmeta>
26             <refentrytitle>FcFileScan</refentrytitle>
27             <manvolnum>3</manvolnum>
28             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
29         </refmeta>
30         <refnamediv>
31             <refname>FcFileScan</refname>
32             <refpurpose>scan a font file</refpurpose>
33         </refnamediv>
34         <refsynopsisdiv>
35         <funcsynopsis>
36         <funcsynopsisinfo>
37 #include &lt;fontconfig/fontconfig.h&gt;
38         </funcsynopsisinfo>
39         <funcprototype>
40             <funcdef>FcBool <function>FcFileScan</function></funcdef>
41                 <paramdef>FcFontSet *<parameter>set</parameter></paramdef>
42                 <paramdef>FcStrSet *<parameter>dirs</parameter></paramdef>
43                 <paramdef>FcFileCache *<parameter>cache</parameter></paramdef>
44                 <paramdef>FcBlanks *<parameter>blanks</parameter></paramdef>
45                 <paramdef>const FcChar8 *<parameter>file</parameter></paramdef>
46                 <paramdef>FcBool <parameter>force</parameter></paramdef>
47         </funcprototype>
48         </funcsynopsis>
49         </refsynopsisdiv>
50         <refsect1><title>Description</title>
51             <para>
52 Scans a single file and adds all fonts found to <parameter>set</parameter>.
53 If <parameter>force</parameter> is FcTrue, then the file is scanned even if
54 associated information is found in <parameter>cache</parameter>.  If
55 <parameter>file</parameter> is a directory, it is added to
56 <parameter>dirs</parameter>. Whether fonts are found depends on fontconfig
57 policy as well as the current configuration. Internally, fontconfig will
58 ignore BDF and PCF fonts which are not in Unicode (or the effectively
59 equivalent ISO Latin-1) encoding as those are not usable by Unicode-based
60 applications. The configuration can ignore fonts based on filename or
61 contents of the font file itself. Returns FcFalse if any of the fonts cannot be
62 added (due to allocation failure). Otherwise returns FcTrue.
63             </para>
64         </refsect1>
65     </refentry>
66 <!--
67    fontconfig/doc/func.sgml
68   
69    Copyright © 2003 Keith Packard
70   
71    Permission to use, copy, modify, distribute, and sell this software and its
72    documentation for any purpose is hereby granted without fee, provided that
73    the above copyright notice appear in all copies and that both that
74    copyright notice and this permission notice appear in supporting
75    documentation, and that the name of the author(s) not be used in
76    advertising or publicity pertaining to distribution of the software without
77    specific, written prior permission.  The authors make no
78    representations about the suitability of this software for any purpose.  It
79    is provided "as is" without express or implied warranty.
80   
81    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
82    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
83    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
84    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
85    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
86    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
87    PERFORMANCE OF THIS SOFTWARE.
88  -->
89     <refentry id="FcFileIsDir">
90         <refmeta>
91             <refentrytitle>FcFileIsDir</refentrytitle>
92             <manvolnum>3</manvolnum>
93             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
94         </refmeta>
95         <refnamediv>
96             <refname>FcFileIsDir</refname>
97             <refpurpose>check whether a file is a directory</refpurpose>
98         </refnamediv>
99         <refsynopsisdiv>
100         <funcsynopsis>
101         <funcsynopsisinfo>
102 #include &lt;fontconfig/fontconfig.h&gt;
103         </funcsynopsisinfo>
104         <funcprototype>
105             <funcdef>FcBool <function>FcFileIsDir</function></funcdef>
106                 <paramdef>const FcChar8 *<parameter>file</parameter></paramdef>
107         </funcprototype>
108         </funcsynopsis>
109         </refsynopsisdiv>
110         <refsect1><title>Description</title>
111             <para>
112 Returns FcTrue if <parameter>file</parameter> is a directory, otherwise
113 returns FcFalse.
114             </para>
115         </refsect1>
116     </refentry>
117 <!--
118    fontconfig/doc/func.sgml
119   
120    Copyright © 2003 Keith Packard
121   
122    Permission to use, copy, modify, distribute, and sell this software and its
123    documentation for any purpose is hereby granted without fee, provided that
124    the above copyright notice appear in all copies and that both that
125    copyright notice and this permission notice appear in supporting
126    documentation, and that the name of the author(s) not be used in
127    advertising or publicity pertaining to distribution of the software without
128    specific, written prior permission.  The authors make no
129    representations about the suitability of this software for any purpose.  It
130    is provided "as is" without express or implied warranty.
131   
132    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
133    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
134    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
135    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
136    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
137    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
138    PERFORMANCE OF THIS SOFTWARE.
139  -->
140     <refentry id="FcDirScan">
141         <refmeta>
142             <refentrytitle>FcDirScan</refentrytitle>
143             <manvolnum>3</manvolnum>
144             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
145         </refmeta>
146         <refnamediv>
147             <refname>FcDirScan</refname>
148             <refpurpose>scan a font directory without caching it</refpurpose>
149         </refnamediv>
150         <refsynopsisdiv>
151         <funcsynopsis>
152         <funcsynopsisinfo>
153 #include &lt;fontconfig/fontconfig.h&gt;
154         </funcsynopsisinfo>
155         <funcprototype>
156             <funcdef>FcBool <function>FcDirScan</function></funcdef>
157                 <paramdef>FcFontSet *<parameter>set</parameter></paramdef>
158                 <paramdef>FcStrSet *<parameter>dirs</parameter></paramdef>
159                 <paramdef>FcFileCache *<parameter>cache</parameter></paramdef>
160                 <paramdef>FcBlanks *<parameter>blanks</parameter></paramdef>
161                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
162                 <paramdef>FcBool <parameter>force</parameter></paramdef>
163         </funcprototype>
164         </funcsynopsis>
165         </refsynopsisdiv>
166         <refsect1><title>Description</title>
167             <para>
168 If <parameter>cache</parameter> is not zero or if <parameter>force</parameter>
169 is FcFalse, this function currently returns FcFalse.  Otherwise, it scans an
170 entire directory and adds all fonts found to <parameter>set</parameter>.
171 Any subdirectories found are added to <parameter>dirs</parameter>.  Calling
172 this function does not create any cache files.  Use FcDirCacheRead() if
173 caching is desired.
174             </para>
175         </refsect1>
176     </refentry>
177 <!--
178    fontconfig/doc/func.sgml
179   
180    Copyright © 2003 Keith Packard
181   
182    Permission to use, copy, modify, distribute, and sell this software and its
183    documentation for any purpose is hereby granted without fee, provided that
184    the above copyright notice appear in all copies and that both that
185    copyright notice and this permission notice appear in supporting
186    documentation, and that the name of the author(s) not be used in
187    advertising or publicity pertaining to distribution of the software without
188    specific, written prior permission.  The authors make no
189    representations about the suitability of this software for any purpose.  It
190    is provided "as is" without express or implied warranty.
191   
192    THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
193    INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
194    EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
195    CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
196    DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
197    TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
198    PERFORMANCE OF THIS SOFTWARE.
199  -->
200     <refentry id="FcDirSave">
201         <refmeta>
202             <refentrytitle>FcDirSave</refentrytitle>
203             <manvolnum>3</manvolnum>
204             <refmiscinfo class="software">Fontconfig &version;</refmiscinfo>
205         </refmeta>
206         <refnamediv>
207             <refname>FcDirSave</refname>
208             <refpurpose>DEPRECATED: formerly used to save a directory cache</refpurpose>
209         </refnamediv>
210         <refsynopsisdiv>
211         <funcsynopsis>
212         <funcsynopsisinfo>
213 #include &lt;fontconfig/fontconfig.h&gt;
214         </funcsynopsisinfo>
215         <funcprototype>
216             <funcdef>FcBool <function>FcDirSave</function></funcdef>
217                 <paramdef>FcFontSet *<parameter>set</parameter></paramdef>
218                 <paramdef>FcStrSet *<parameter>dirs</parameter></paramdef>
219                 <paramdef>const FcChar8 *<parameter>dir</parameter></paramdef>
220         </funcprototype>
221         </funcsynopsis>
222         </refsynopsisdiv>
223         <refsect1><title>Description</title>
224             <para>
225 This function now does nothing aside from returning FcFalse. It used to creates the
226 per-directory cache file for <parameter>dir</parameter> and populates it
227 with the fonts in <parameter>set</parameter> and subdirectories in
228 <parameter>dirs</parameter>. All of this functionality is now automatically
229 managed by FcDirCacheLoad and FcDirCacheRead.
230             </para>
231         </refsect1>
232     </refentry>