~ubuntu-branches/ubuntu/precise/libxfont/precise-security

« back to all changes in this revision

Viewing changes to src/fontfile/ffcheck.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2007-04-11 15:52:11 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070411155211-6ed2v2akv5dq8uev
Tags: 1:1.2.8-1
* Add XS-Vcs-Browser to debian/control.
* New upstream release.
  + drop patch from 1:1.2.2-2, applied upstream.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#endif
38
38
#include <X11/fonts/fntfilst.h>
39
39
#include <X11/fonts/bitmap.h>
40
 
#ifdef LOADABLEFONTS
41
40
#include <X11/fonts/fontmod.h>
42
 
#endif
43
41
 
44
42
/*
45
43
 * Map FPE functions to renderer functions
118
116
    return BadFontName;
119
117
}
120
118
 
 
119
/* Font renderers to initialize when not linked into something like
 
120
   Xorg that provides its own module configuration options */
 
121
static const FontModule builtinFontModuleList[] = {
 
122
#ifdef XFONT_SPEEDO
 
123
    {
 
124
        SpeedoRegisterFontFileFunctions,
 
125
        "speedo",
 
126
        NULL
 
127
    },
 
128
#endif
 
129
#ifdef XFONT_TYPE1
 
130
    {
 
131
        Type1RegisterFontFileFunctions,
 
132
        "type1",
 
133
        NULL
 
134
    },
 
135
#endif
 
136
#ifdef XFONT_FREETYPE    
 
137
    {
 
138
        FreeTypeRegisterFontFileFunctions,
 
139
        "freetype",
 
140
        NULL
 
141
    },
 
142
#endif
 
143
    /* List terminator - must be last entry */
 
144
    {   NULL, NULL, NULL }
 
145
};
 
146
 
121
147
void
122
148
FontFileCheckRegisterFpeFunctions (void)
123
149
{
124
 
#ifndef LOADABLEFONTS
 
150
    FontModule *fmlist = builtinFontModuleList;
 
151
    
 
152
#ifdef XFONT_BITMAP
 
153
    /* bitmap is always builtin to libXfont now */
125
154
    BitmapRegisterFontFileFunctions ();
126
 
 
127
 
 
128
 
#ifdef XFONT_SPEEDO
129
 
    SpeedoRegisterFontFileFunctions ();
130
 
#endif
131
 
#ifdef XFONT_TYPE1
132
 
    Type1RegisterFontFileFunctions();
133
 
#endif
134
 
#ifdef XFONT_FREETYPE
135
 
    FreeTypeRegisterFontFileFunctions();
136
 
#endif
137
 
 
138
 
 
139
 
#else
140
 
 
141
 
    {
 
155
#endif
 
156
 
 
157
#ifdef LOADABLEFONTS
 
158
    if (FontModuleList) {
 
159
        fmlist = FontModuleList;
 
160
    }
 
161
#endif
 
162
 
 
163
    if (fmlist) {
142
164
        int i;
143
165
 
144
 
        if (FontModuleList) {
145
 
            for (i = 0; FontModuleList[i].name; i++) {
146
 
                if (FontModuleList[i].initFunc)
147
 
                    FontModuleList[i].initFunc();
 
166
        for (i = 0; fmlist[i].name; i++) {
 
167
            if (fmlist[i].initFunc) {
 
168
                fmlist[i].initFunc();
148
169
            }
149
170
        }
150
171
    }
151
 
#endif
152
172
 
153
173
    RegisterFPEFunctions(FontFileNameCheck,
154
174
                         FontFileInitFPE,