1/*
2 * fontconfig/doc/fcfreetype.fncs
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
25@SYNOPSIS@
26#include <fontconfig.h>
27#include <fcfreetype.h>
28@RET@           FT_UInt
29@FUNC@          FcFreeTypeCharIndex
30@TYPE1@         FT_Face%                        @ARG1@          face
31@TYPE2@         FcChar32%                       @ARG2@          ucs4
32@PURPOSE@       map Unicode to glyph id
33@DESC@
34Maps a Unicode char to a glyph index.  This function uses information from
35several possible underlying encoding tables to work around broken fonts.
36As a result, this function isn't designed to be used in performance
37sensitive areas; results from this function are intended to be cached by
38higher level functions.
39@@
40
41@SYNOPSIS@
42#include <fontconfig.h>
43#include <fcfreetype.h>
44@RET@           FcCharSet *
45@FUNC@          FcFreeTypeCharSet
46@TYPE1@         FT_Face%                        @ARG1@          face
47@TYPE2@         FcBlanks *                      @ARG2@          blanks
48@PURPOSE@       compute Unicode coverage
49@DESC@
50Scans a FreeType face and returns the set of encoded Unicode chars.
51FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
52accepted only for compatibility with older code.
53@@
54
55@SYNOPSIS@
56#include &lt;fontconfig.h&gt;
57#include &lt;fcfreetype.h&gt;
58@RET@           FcCharSet *
59@FUNC@          FcFreeTypeCharSetAndSpacing
60@TYPE1@         FT_Face%                        @ARG1@          face
61@TYPE2@         FcBlanks *                      @ARG2@          blanks
62@TYPE3@         int *                           @ARG3@          spacing
63@PURPOSE@       compute Unicode coverage and spacing type
64@DESC@
65Scans a FreeType face and returns the set of encoded Unicode chars.
66FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
67accepted only for compatibility with older code.
68<parameter>spacing</parameter> receives the computed spacing type of the
69font, one of FC_MONO for a font where all glyphs have the same width,
70FC_DUAL, where the font has glyphs in precisely two widths, one twice as
71wide as the other, or FC_PROPORTIONAL where the font has glyphs of many
72widths.
73@@
74
75@SYNOPSIS@
76#include &lt;fontconfig.h&gt;
77#include &lt;fcfreetype.h&gt;
78@RET@           FcPattern *
79@FUNC@          FcFreeTypeQuery
80@TYPE1@         const FcChar8 *                 @ARG1@          file
81@TYPE2@         int%                            @ARG2@          id
82@TYPE3@         FcBlanks *                      @ARG3@          blanks
83@TYPE4@         int *                           @ARG4@          count
84@PURPOSE@       compute pattern from font file (and index)
85@DESC@
86Constructs a pattern representing the 'id'th face in 'file'.  The number
87of faces in 'file' is returned in 'count'.
88FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
89accepted only for compatibility with older code.
90@@
91
92unsigned int
93FcFreeTypeQueryAll(const FcChar8        *file,
94                   int                  id,
95                   FcBlanks             *blanks,
96                   int                  *count,
97                   FcFontSet            *set)
98@SYNOPSIS@
99#include &lt;fontconfig.h&gt;
100#include &lt;fcfreetype.h&gt;
101@RET@           unsigned int
102@FUNC@          FcFreeTypeQueryAll
103@TYPE1@         const FcChar8 *                 @ARG1@          file
104@TYPE2@         int%                            @ARG2@          id
105@TYPE3@         FcBlanks *                      @ARG3@          blanks
106@TYPE4@         int *                           @ARG4@          count
107@TYPE5@         FcFontSet *                     @ARG5@          set
108@PURPOSE@       compute all patterns from font file (and index)
109@DESC@
110Constructs patterns found in 'file'.
111If id is -1, then all patterns found in 'file' are added to 'set'.
112Otherwise, this function works exactly like FcFreeTypeQuery().
113The number of faces in 'file' is returned in 'count'.
114The number of patterns added to 'set' is returned.
115FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
116accepted only for compatibility with older code.
117@SINCE@         2.12.91
118@@
119
120@SYNOPSIS@
121#include &lt;fontconfig.h&gt;
122#include &lt;fcfreetype.h&gt;
123@RET@           FcPattern *
124@FUNC@          FcFreeTypeQueryFace
125@TYPE1@         const FT_Face%                  @ARG1@          face
126@TYPE2@         const FcChar8 *                 @ARG2@          file
127@TYPE3@         int%                            @ARG3@          id
128@TYPE4@         FcBlanks *                      @ARG4@          blanks
129@PURPOSE@       compute pattern from FT_Face
130@DESC@
131Constructs a pattern representing 'face'. 'file' and 'id' are used solely as
132data for pattern elements (FC_FILE, FC_INDEX and sometimes FC_FAMILY).
133FcBlanks is deprecated, <parameter>blanks</parameter> is ignored and
134accepted only for compatibility with older code.
135@@
136