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