1 /* $XConsortium: ffcheck.c /main/1 1996/09/28 16:48:58 rws $ */
5 Copyright (c) 1991 X Consortium
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
31 * Author: Keith Packard, MIT X Consortium
33 /* $NCDId: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */
38 * Map FPE functions to renderer functions
41 extern int FontFileNameCheck();
42 extern int FontFileInitFPE();
43 extern int FontFileResetFPE();
44 extern int FontFileFreeFPE();
45 extern void FontFileCloseFont();
48 /* Here we must check the client to see if it has a context attached to
49 * it that allows us to access the printer fonts
53 FontFileCheckOpenFont (client, fpe, flags, name, namelen, format, fmask,
54 id, pFont, aliasName, non_cachable_font)
56 FontPathElementPtr fpe;
60 fsBitmapFormat format;
61 fsBitmapFormatMask fmask;
65 FontPtr non_cachable_font;
67 if (XpClientIsBitmapClient(client))
68 return (FontFileOpenFont (client, fpe, flags, name, namelen, format,
69 fmask, id, pFont, aliasName, non_cachable_font));
73 FontFileCheckListFonts (client, fpe, pat, len, max, names)
75 FontPathElementPtr fpe;
81 if (XpClientIsBitmapClient(client))
82 return FontFileListFonts (client, fpe, pat, len, max, names);
86 FontFileCheckStartListFontsWithInfo(client, fpe, pat, len, max, privatep)
88 FontPathElementPtr fpe;
94 if (XpClientIsBitmapClient(client))
95 return FontFileStartListFontsWithInfo(client, fpe, pat, len,
100 FontFileCheckListNextFontWithInfo(client, fpe, namep, namelenp, pFontInfo,
103 FontPathElementPtr fpe;
106 FontInfoPtr *pFontInfo;
110 if (XpClientIsBitmapClient(client))
111 return FontFileListNextFontWithInfo(client, fpe, namep, namelenp,
112 pFontInfo, numFonts, private);
116 FontFileCheckStartListFontsAndAliases(client, fpe, pat, len, max, privatep)
118 FontPathElementPtr fpe;
124 if (XpClientIsBitmapClient(client))
125 return FontFileStartListFontsAndAliases(client, fpe, pat, len,
131 FontFileCheckListNextFontOrAlias(client, fpe, namep, namelenp, resolvedp,
132 resolvedlenp, private)
134 FontPathElementPtr fpe;
141 if (XpClientIsBitmapClient(client))
142 return FontFileListNextFontOrAlias(client, fpe, namep, namelenp,
143 resolvedp, resolvedlenp, private);
147 extern void FontFileEmptyBitmapSource();
148 typedef int (*IntFunc) ();
149 static int font_file_check_type;
151 FontFileCheckRegisterFpeFunctions ()
153 BitmapRegisterFontFileFunctions ();
155 SpeedoRegisterFontFileFunctions ();
156 Type1RegisterFontFileFunctions();
158 RegisterFPEFunctions(FontFileNameCheck,
162 FontFileCheckOpenFont,
164 FontFileCheckListFonts,
165 FontFileCheckStartListFontsWithInfo,
166 FontFileCheckListNextFontWithInfo,
170 FontFileCheckStartListFontsAndAliases,
171 FontFileCheckListNextFontOrAlias,
172 FontFileEmptyBitmapSource);