summaryrefslogtreecommitdiff
path: root/src/fontfile/ffcheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontfile/ffcheck.c')
-rw-r--r--src/fontfile/ffcheck.c139
1 files changed, 67 insertions, 72 deletions
diff --git a/src/fontfile/ffcheck.c b/src/fontfile/ffcheck.c
index 6f29801..4de2a4b 100644
--- a/src/fontfile/ffcheck.c
+++ b/src/fontfile/ffcheck.c
@@ -25,43 +25,34 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/font/fontfile/ffcheck.c,v 1.15 2001/12/14 19:56:51 dawes Exp $ */
/*
* Author: Keith Packard, MIT X Consortium
*/
-/* $NCDId: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */
+/* $NCDXorg: @(#)fontfile.c,v 1.6 1991/07/02 17:00:46 lemke Exp $ */
-#include "fntfilst.h"
+#include "fntfilst.h"
+#include "bitmap.h"
+#ifdef LOADABLEFONTS
+#include "fontmod.h"
+#endif
/*
* Map FPE functions to renderer functions
*/
-extern int FontFileNameCheck();
-extern int FontFileInitFPE();
-extern int FontFileResetFPE();
-extern int FontFileFreeFPE();
-extern void FontFileCloseFont();
-
/* Here we must check the client to see if it has a context attached to
* it that allows us to access the printer fonts
*/
-int
-FontFileCheckOpenFont (client, fpe, flags, name, namelen, format, fmask,
- id, pFont, aliasName, non_cachable_font)
- pointer client;
- FontPathElementPtr fpe;
- int flags;
- char *name;
- int namelen;
- fsBitmapFormat format;
- fsBitmapFormatMask fmask;
- XID id;
- FontPtr *pFont;
- char **aliasName;
- FontPtr non_cachable_font;
+static int
+FontFileCheckOpenFont (pointer client, FontPathElementPtr fpe, Mask flags,
+ char *name, int namelen,
+ fsBitmapFormat format, fsBitmapFormatMask fmask,
+ XID id, FontPtr *pFont, char **aliasName,
+ FontPtr non_cachable_font)
{
if (XpClientIsBitmapClient(client))
return (FontFileOpenFont (client, fpe, flags, name, namelen, format,
@@ -69,28 +60,19 @@ FontFileCheckOpenFont (client, fpe, flags, name, namelen, format, fmask,
return BadFontName;
}
-int
-FontFileCheckListFonts (client, fpe, pat, len, max, names)
- pointer client;
- FontPathElementPtr fpe;
- char *pat;
- int len;
- int max;
- FontNamesPtr names;
+static int
+FontFileCheckListFonts (pointer client, FontPathElementPtr fpe,
+ char *pat, int len, int max, FontNamesPtr names)
{
if (XpClientIsBitmapClient(client))
return FontFileListFonts (client, fpe, pat, len, max, names);
return BadFontName;
}
-int
-FontFileCheckStartListFontsWithInfo(client, fpe, pat, len, max, privatep)
- pointer client;
- FontPathElementPtr fpe;
- char *pat;
- int len;
- int max;
- pointer *privatep;
+static int
+FontFileCheckStartListFontsWithInfo(pointer client, FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep)
{
if (XpClientIsBitmapClient(client))
return FontFileStartListFontsWithInfo(client, fpe, pat, len,
@@ -98,16 +80,11 @@ FontFileCheckStartListFontsWithInfo(client, fpe, pat, len, max, privatep)
return BadFontName;
}
-int
-FontFileCheckListNextFontWithInfo(client, fpe, namep, namelenp, pFontInfo,
- numFonts, private)
- pointer client;
- FontPathElementPtr fpe;
- char **namep;
- int *namelenp;
- FontInfoPtr *pFontInfo;
- int *numFonts;
- pointer private;
+static int
+FontFileCheckListNextFontWithInfo(pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ FontInfoPtr *pFontInfo,
+ int *numFonts, pointer private)
{
if (XpClientIsBitmapClient(client))
return FontFileListNextFontWithInfo(client, fpe, namep, namelenp,
@@ -115,14 +92,10 @@ FontFileCheckListNextFontWithInfo(client, fpe, namep, namelenp, pFontInfo,
return BadFontName;
}
-int
-FontFileCheckStartListFontsAndAliases(client, fpe, pat, len, max, privatep)
- pointer client;
- FontPathElementPtr fpe;
- char *pat;
- int len;
- int max;
- pointer *privatep;
+static int
+FontFileCheckStartListFontsAndAliases(pointer client, FontPathElementPtr fpe,
+ char *pat, int len, int max,
+ pointer *privatep)
{
if (XpClientIsBitmapClient(client))
return FontFileStartListFontsAndAliases(client, fpe, pat, len,
@@ -130,16 +103,11 @@ FontFileCheckStartListFontsAndAliases(client, fpe, pat, len, max, privatep)
return BadFontName;
}
-int
-FontFileCheckListNextFontOrAlias(client, fpe, namep, namelenp, resolvedp,
- resolvedlenp, private)
- pointer client;
- FontPathElementPtr fpe;
- char **namep;
- int *namelenp;
- char **resolvedp;
- int *resolvedlenp;
- pointer private;
+static int
+FontFileCheckListNextFontOrAlias(pointer client, FontPathElementPtr fpe,
+ char **namep, int *namelenp,
+ char **resolvedp, int *resolvedlenp,
+ pointer private)
{
if (XpClientIsBitmapClient(client))
return FontFileListNextFontOrAlias(client, fpe, namep, namelenp,
@@ -147,24 +115,51 @@ FontFileCheckListNextFontOrAlias(client, fpe, namep, namelenp, resolvedp,
return BadFontName;
}
-extern void FontFileEmptyBitmapSource();
-typedef int (*IntFunc) ();
+typedef int (*IntFunc) (void);
static int font_file_check_type;
void
-FontFileCheckRegisterFpeFunctions ()
+FontFileCheckRegisterFpeFunctions (void)
{
+#ifndef LOADABLEFONTS
BitmapRegisterFontFileFunctions ();
#ifndef LOWMEMFTPT
#ifndef CRAY
+#ifdef BUILD_SPEEDO
SpeedoRegisterFontFileFunctions ();
+#endif
+#ifdef BUILD_TYPE1
Type1RegisterFontFileFunctions();
#endif
+#endif
+#ifdef BUILD_CID
+ CIDRegisterFontFileFunctions();
+#endif
+#ifdef BUILD_FREETYPE
+ FreeTypeRegisterFontFileFunctions();
+#endif
+#ifdef BUILD_XTRUETYPE
+ XTrueTypeRegisterFontFileFunctions();
+#endif
#endif /* ifndef LOWMEMFTPT */
+#else
+
+ {
+ int i;
+
+ if (FontModuleList) {
+ for (i = 0; FontModuleList[i].name; i++) {
+ if (FontModuleList[i].initFunc)
+ FontModuleList[i].initFunc();
+ }
+ }
+ }
+#endif
+
font_file_check_type = RegisterFPEFunctions(FontFileNameCheck,
FontFileInitFPE,
FontFileFreeFPE,
@@ -174,9 +169,9 @@ FontFileCheckRegisterFpeFunctions ()
FontFileCheckListFonts,
FontFileCheckStartListFontsWithInfo,
FontFileCheckListNextFontWithInfo,
- (IntFunc) 0,
- (IntFunc) 0,
- (IntFunc) 0,
+ NULL,
+ NULL,
+ NULL,
FontFileCheckStartListFontsAndAliases,
FontFileCheckListNextFontOrAlias,
FontFileEmptyBitmapSource);