~ubuntu-branches/ubuntu/trusty/libxfont/trusty-proposed

« back to all changes in this revision

Viewing changes to src/bitmap/bitmapfunc.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Potyra
  • Date: 2009-05-09 12:11:53 UTC
  • mfrom: (1.1.10 upstream) (10.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090509121153-nwte290k1e9gew62
Tags: 1:1.4.0-1ubuntu1
* Rebase to unstable, remaining change:
  + debian/rules: unset LDFLAGS to not be hit by -Bsymbolic-functions,
    as libxfont contains weak symbols which are meant to be overriden
    (cf. LP #226156).

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                               FontFilePtr /* file */ );
68
68
}           BitmapFileFunctionsRec, *BitmapFileFunctionsPtr;
69
69
 
 
70
static int BitmapGetRenderIndex(FontRendererPtr renderer);
70
71
 
71
72
/*
72
73
 * the readers[] and renderers[] arrays must be in the same order,
77
78
#if XFONT_PCFFORMAT
78
79
    { pcfReadFont, pcfReadFontInfo} ,
79
80
    { pcfReadFont, pcfReadFontInfo} ,
80
 
#ifdef X_GZIP_FONT_COMPRESSION
81
 
    { pcfReadFont, pcfReadFontInfo} ,
82
 
#endif
 
81
# ifdef X_GZIP_FONT_COMPRESSION
 
82
    { pcfReadFont, pcfReadFontInfo} ,
 
83
# endif
 
84
# ifdef X_BZIP2_FONT_COMPRESSION
 
85
    { pcfReadFont, pcfReadFontInfo} ,
 
86
# endif
83
87
#endif
84
88
#if XFONT_SNFFORMAT
85
89
    { snfReadFont, snfReadFontInfo},
86
90
    { snfReadFont, snfReadFontInfo},
87
 
#ifdef X_GZIP_FONT_COMPRESSION
88
 
    { snfReadFont, snfReadFontInfo} ,
89
 
#endif
 
91
# ifdef X_GZIP_FONT_COMPRESSION
 
92
    { snfReadFont, snfReadFontInfo} ,
 
93
# endif
 
94
# ifdef X_BZIP2_FONT_COMPRESSION
 
95
    { snfReadFont, snfReadFontInfo} ,
 
96
# endif
90
97
#endif
91
98
#if XFONT_BDFFORMAT
92
99
    { bdfReadFont, bdfReadFontInfo} ,
93
100
    { bdfReadFont, bdfReadFontInfo} ,
94
 
#ifdef X_GZIP_FONT_COMPRESSION
95
 
    { bdfReadFont, bdfReadFontInfo} ,
96
 
#endif
97
 
#endif
98
 
#if XFONT_PCFFORMAT
99
 
    { pmfReadFont, pcfReadFontInfo} ,
 
101
# ifdef X_GZIP_FONT_COMPRESSION
 
102
    { bdfReadFont, bdfReadFontInfo} ,
 
103
# endif
 
104
# ifdef X_BZIP2_FONT_COMPRESSION
 
105
    { bdfReadFont, bdfReadFontInfo} ,
 
106
# endif
100
107
#endif
101
108
};
102
109
 
141
148
 
142
149
    FontFileClose (file);
143
150
    if (ret != Successful) {
144
 
        xfree(pFont);
 
151
        free(pFont);
145
152
    } else {
146
153
        *ppFont = pFont;
147
154
    }
177
184
    { ".pcf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
178
185
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
179
186
        CAPABILITIES },
180
 
#ifdef X_GZIP_FONT_COMPRESSION
 
187
# ifdef X_GZIP_FONT_COMPRESSION
181
188
    { ".pcf.gz", 7,
182
 
    BitmapOpenBitmap, BitmapOpenScalable,
183
 
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
184
 
        CAPABILITIES },
185
 
#endif
 
189
        BitmapOpenBitmap, BitmapOpenScalable,
 
190
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
 
191
        CAPABILITIES },
 
192
# endif
 
193
# ifdef X_BZIP2_FONT_COMPRESSION
 
194
    { ".pcf.bz2", 8,
 
195
        BitmapOpenBitmap, BitmapOpenScalable,
 
196
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
 
197
        CAPABILITIES },
 
198
# endif
186
199
#endif
187
200
#if XFONT_SNFFORMAT
188
201
    { ".snf", 4, BitmapOpenBitmap, BitmapOpenScalable,
191
204
    { ".snf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
192
205
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
193
206
        CAPABILITIES },
194
 
#ifdef X_GZIP_FONT_COMPRESSION
 
207
# ifdef X_GZIP_FONT_COMPRESSION
195
208
    { ".snf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
196
209
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
197
210
        CAPABILITIES },
198
 
#endif
 
211
# endif
 
212
# ifdef X_BZIP2_FONT_COMPRESSION
 
213
    { ".snf.bz2", 8, BitmapOpenBitmap, BitmapOpenScalable,
 
214
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
 
215
        CAPABILITIES },
 
216
# endif
199
217
#endif
200
218
#if XFONT_BDFFORMAT
201
219
    { ".bdf", 4, BitmapOpenBitmap, BitmapOpenScalable,
204
222
    { ".bdf.Z", 6, BitmapOpenBitmap, BitmapOpenScalable,
205
223
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
206
224
        CAPABILITIES },
207
 
#ifdef X_GZIP_FONT_COMPRESSION
 
225
# ifdef X_GZIP_FONT_COMPRESSION
208
226
    { ".bdf.gz", 7, BitmapOpenBitmap, BitmapOpenScalable,
209
227
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
210
228
        CAPABILITIES },
211
 
#endif
212
 
#endif
213
 
#if XFONT_PCFFORMAT
214
 
    { ".pmf", 4, BitmapOpenBitmap, BitmapOpenScalable,
 
229
# endif
 
230
# ifdef X_BZIP2_FONT_COMPRESSION
 
231
    { ".bdf.bz2", 8, BitmapOpenBitmap, BitmapOpenScalable,
215
232
        BitmapGetInfoBitmap, BitmapGetInfoScalable, 0,
216
 
        CAPABILITIES }
 
233
        CAPABILITIES },
 
234
# endif
217
235
#endif
218
236
};
219
237
 
233
251
 * the font info reader, and the bitmap scaling routine.  All users
234
252
 * of this routine must be kept in step with the renderer array.
235
253
 */
236
 
int
 
254
static int
237
255
BitmapGetRenderIndex(FontRendererPtr renderer)
238
256
{
239
257
    return renderer - renderers;