~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/freetype/src/pcf/pcfdrivr.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  pcfdrivr.c
 
2
 
 
3
    FreeType font driver for pcf files
 
4
 
 
5
    Copyright (C) 2000, 2001, 2002, 2003, 2004 by
 
6
    Francesco Zappa Nardelli
 
7
 
 
8
Permission is hereby granted, free of charge, to any person obtaining a copy
 
9
of this software and associated documentation files (the "Software"), to deal
 
10
in the Software without restriction, including without limitation the rights
 
11
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
12
copies of the Software, and to permit persons to whom the Software is
 
13
furnished to do so, subject to the following conditions:
 
14
 
 
15
The above copyright notice and this permission notice shall be included in
 
16
all copies or substantial portions of the Software.
 
17
 
 
18
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
19
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
20
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
21
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
22
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
23
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
24
THE SOFTWARE.
 
25
*/
 
26
 
 
27
 
 
28
#include <ft2build.h>
 
29
 
 
30
#include FT_INTERNAL_DEBUG_H
 
31
#include FT_INTERNAL_STREAM_H
 
32
#include FT_INTERNAL_OBJECTS_H
 
33
#include FT_GZIP_H
 
34
#include FT_LZW_H
 
35
#include FT_ERRORS_H
 
36
#include FT_BDF_H
 
37
 
 
38
#include "pcf.h"
 
39
#include "pcfdrivr.h"
 
40
#include "pcfread.h"
 
41
 
 
42
#include "pcferror.h"
 
43
#include "pcfutil.h"
 
44
 
 
45
#undef  FT_COMPONENT
 
46
#define FT_COMPONENT  trace_pcfread
 
47
 
 
48
#include FT_SERVICE_BDF_H
 
49
#include FT_SERVICE_XFREE86_NAME_H
 
50
 
 
51
 
 
52
  /*************************************************************************/
 
53
  /*                                                                       */
 
54
  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
 
55
  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
 
56
  /* messages during execution.                                            */
 
57
  /*                                                                       */
 
58
#undef  FT_COMPONENT
 
59
#define FT_COMPONENT  trace_pcfdriver
 
60
 
 
61
 
 
62
  typedef struct  PCF_CMapRec_
 
63
  {
 
64
    FT_CMapRec    root;
 
65
    FT_UInt       num_encodings;
 
66
    PCF_Encoding  encodings;
 
67
 
 
68
  } PCF_CMapRec, *PCF_CMap;
 
69
 
 
70
 
 
71
  FT_CALLBACK_DEF( FT_Error )
 
72
  pcf_cmap_init( FT_CMap     pcfcmap,   /* PCF_CMap */
 
73
                 FT_Pointer  init_data )
 
74
  {
 
75
    PCF_CMap  cmap = (PCF_CMap)pcfcmap;
 
76
    PCF_Face  face = (PCF_Face)FT_CMAP_FACE( pcfcmap );
 
77
 
 
78
    FT_UNUSED( init_data );
 
79
 
 
80
 
 
81
    cmap->num_encodings = (FT_UInt)face->nencodings;
 
82
    cmap->encodings     = face->encodings;
 
83
 
 
84
    return PCF_Err_Ok;
 
85
  }
 
86
 
 
87
 
 
88
  FT_CALLBACK_DEF( void )
 
89
  pcf_cmap_done( FT_CMap  pcfcmap )         /* PCF_CMap */
 
90
  {
 
91
    PCF_CMap  cmap = (PCF_CMap)pcfcmap;
 
92
 
 
93
 
 
94
    cmap->encodings     = NULL;
 
95
    cmap->num_encodings = 0;
 
96
  }
 
97
 
 
98
 
 
99
  FT_CALLBACK_DEF( FT_UInt )
 
100
  pcf_cmap_char_index( FT_CMap    pcfcmap,  /* PCF_CMap */
 
101
                       FT_UInt32  charcode )
 
102
  {
 
103
    PCF_CMap      cmap      = (PCF_CMap)pcfcmap;
 
104
    PCF_Encoding  encodings = cmap->encodings;
 
105
    FT_UInt       min, max, mid;
 
106
    FT_UInt       result    = 0;
 
107
 
 
108
 
 
109
    min = 0;
 
110
    max = cmap->num_encodings;
 
111
 
 
112
    while ( min < max )
 
113
    {
 
114
      FT_UInt32  code;
 
115
 
 
116
 
 
117
      mid  = ( min + max ) >> 1;
 
118
      code = encodings[mid].enc;
 
119
 
 
120
      if ( charcode == code )
 
121
      {
 
122
        result = encodings[mid].glyph + 1;
 
123
        break;
 
124
      }
 
125
 
 
126
      if ( charcode < code )
 
127
        max = mid;
 
128
      else
 
129
        min = mid + 1;
 
130
    }
 
131
 
 
132
    return result;
 
133
  }
 
134
 
 
135
 
 
136
  FT_CALLBACK_DEF( FT_UInt )
 
137
  pcf_cmap_char_next( FT_CMap    pcfcmap,   /* PCF_CMap */
 
138
                      FT_UInt32  *acharcode )
 
139
  {
 
140
    PCF_CMap      cmap      = (PCF_CMap)pcfcmap;
 
141
    PCF_Encoding  encodings = cmap->encodings;
 
142
    FT_UInt       min, max, mid;
 
143
    FT_UInt32     charcode  = *acharcode + 1;
 
144
    FT_UInt       result    = 0;
 
145
 
 
146
 
 
147
    min = 0;
 
148
    max = cmap->num_encodings;
 
149
 
 
150
    while ( min < max )
 
151
    {
 
152
      FT_UInt32  code;
 
153
 
 
154
 
 
155
      mid  = ( min + max ) >> 1;
 
156
      code = encodings[mid].enc;
 
157
 
 
158
      if ( charcode == code )
 
159
      {
 
160
        result = encodings[mid].glyph + 1;
 
161
        goto Exit;
 
162
      }
 
163
 
 
164
      if ( charcode < code )
 
165
        max = mid;
 
166
      else
 
167
        min = mid + 1;
 
168
    }
 
169
 
 
170
    charcode = 0;
 
171
    if ( min < cmap->num_encodings )
 
172
    {
 
173
      charcode = encodings[min].enc;
 
174
      result   = encodings[min].glyph + 1;
 
175
    }
 
176
 
 
177
  Exit:
 
178
    *acharcode = charcode;
 
179
    return result;
 
180
  }
 
181
 
 
182
 
 
183
  FT_CALLBACK_TABLE_DEF
 
184
  const FT_CMap_ClassRec  pcf_cmap_class =
 
185
  {
 
186
    sizeof ( PCF_CMapRec ),
 
187
    pcf_cmap_init,
 
188
    pcf_cmap_done,
 
189
    pcf_cmap_char_index,
 
190
    pcf_cmap_char_next
 
191
  };
 
192
 
 
193
 
 
194
  FT_CALLBACK_DEF( void )
 
195
  PCF_Face_Done( FT_Face  pcfface )         /* PCF_Face */
 
196
  {
 
197
    PCF_Face   face   = (PCF_Face)pcfface;
 
198
    FT_Memory  memory = FT_FACE_MEMORY( face );
 
199
 
 
200
 
 
201
    FT_FREE( face->encodings );
 
202
    FT_FREE( face->metrics );
 
203
 
 
204
    /* free properties */
 
205
    {
 
206
      PCF_Property  prop = face->properties;
 
207
      FT_Int        i;
 
208
 
 
209
 
 
210
      for ( i = 0; i < face->nprops; i++ )
 
211
      {
 
212
        prop = &face->properties[i];
 
213
 
 
214
        FT_FREE( prop->name );
 
215
        if ( prop->isString )
 
216
          FT_FREE( prop->value );
 
217
      }
 
218
 
 
219
      FT_FREE( face->properties );
 
220
    }
 
221
 
 
222
    FT_FREE( face->toc.tables );
 
223
    FT_FREE( pcfface->family_name );
 
224
    FT_FREE( pcfface->available_sizes );
 
225
    FT_FREE( face->charset_encoding );
 
226
    FT_FREE( face->charset_registry );
 
227
 
 
228
    FT_TRACE4(( "PCF_Face_Done: done face\n" ));
 
229
 
 
230
    /* close gzip/LZW stream if any */
 
231
    if ( pcfface->stream == &face->gzip_stream )
 
232
    {
 
233
      FT_Stream_Close( &face->gzip_stream );
 
234
      pcfface->stream = face->gzip_source;
 
235
    }
 
236
  }
 
237
 
 
238
 
 
239
  FT_CALLBACK_DEF( FT_Error )
 
240
  PCF_Face_Init( FT_Stream      stream,
 
241
                 FT_Face        pcfface,        /* PCF_Face */
 
242
                 FT_Int         face_index,
 
243
                 FT_Int         num_params,
 
244
                 FT_Parameter*  params )
 
245
  {
 
246
    PCF_Face  face  = (PCF_Face)pcfface;
 
247
    FT_Error  error = PCF_Err_Ok;
 
248
 
 
249
    FT_UNUSED( num_params );
 
250
    FT_UNUSED( params );
 
251
    FT_UNUSED( face_index );
 
252
 
 
253
 
 
254
    error = pcf_load_font( stream, face );
 
255
    if ( error )
 
256
    {
 
257
      FT_Error  error2;
 
258
 
 
259
 
 
260
      /* this didn't work, try gzip support! */
 
261
      error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );
 
262
      if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
 
263
        goto Fail;
 
264
 
 
265
      error = error2;
 
266
      if ( error )
 
267
      {
 
268
        FT_Error  error3;
 
269
 
 
270
 
 
271
        /* this didn't work, try LZW support! */
 
272
        error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream );
 
273
        if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
 
274
          goto Fail;
 
275
 
 
276
        error = error3;
 
277
        if ( error )
 
278
          goto Fail;
 
279
 
 
280
        face->gzip_source = stream;
 
281
        pcfface->stream   = &face->gzip_stream;
 
282
 
 
283
        stream = pcfface->stream;
 
284
 
 
285
        error = pcf_load_font( stream, face );
 
286
        if ( error )
 
287
          goto Fail;
 
288
      }
 
289
      else
 
290
      {
 
291
        face->gzip_source = stream;
 
292
        pcfface->stream   = &face->gzip_stream;
 
293
 
 
294
        stream = pcfface->stream;
 
295
 
 
296
        error = pcf_load_font( stream, face );
 
297
        if ( error )
 
298
          goto Fail;
 
299
      }
 
300
    }
 
301
 
 
302
    /* set up charmap */
 
303
    {
 
304
      FT_String  *charset_registry = face->charset_registry;
 
305
      FT_String  *charset_encoding = face->charset_encoding;
 
306
      FT_Bool     unicode_charmap  = 0;
 
307
 
 
308
 
 
309
      if ( charset_registry && charset_encoding )
 
310
      {
 
311
        char*  s = charset_registry;
 
312
 
 
313
 
 
314
        /* Uh, oh, compare first letters manually to avoid dependency
 
315
           on locales. */
 
316
        if ( ( s[0] == 'i' || s[0] == 'I' ) &&
 
317
             ( s[1] == 's' || s[1] == 'S' ) &&
 
318
             ( s[2] == 'o' || s[2] == 'O' ) )
 
319
        {
 
320
          s += 3;
 
321
          if ( !ft_strcmp( s, "10646" )                      ||
 
322
               ( !ft_strcmp( s, "8859" ) &&
 
323
                 !ft_strcmp( face->charset_encoding, "1" ) ) )
 
324
          unicode_charmap = 1;
 
325
        }
 
326
      }
 
327
 
 
328
      {
 
329
        FT_CharMapRec  charmap;
 
330
 
 
331
 
 
332
        charmap.face        = FT_FACE( face );
 
333
        charmap.encoding    = FT_ENCODING_NONE;
 
334
        charmap.platform_id = 0;
 
335
        charmap.encoding_id = 0;
 
336
 
 
337
        if ( unicode_charmap )
 
338
        {
 
339
          charmap.encoding    = FT_ENCODING_UNICODE;
 
340
          charmap.platform_id = 3;
 
341
          charmap.encoding_id = 1;
 
342
        }
 
343
 
 
344
        error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
 
345
 
 
346
#if 0
 
347
        /* Select default charmap */
 
348
        if ( pcfface->num_charmaps )
 
349
          pcfface->charmap = pcfface->charmaps[0];
 
350
#endif
 
351
      }
 
352
    }
 
353
 
 
354
  Exit:
 
355
    return error;
 
356
 
 
357
  Fail:
 
358
    FT_TRACE2(( "[not a valid PCF file]\n" ));
 
359
    error = PCF_Err_Unknown_File_Format;  /* error */
 
360
    goto Exit;
 
361
  }
 
362
 
 
363
 
 
364
  FT_CALLBACK_DEF( FT_Error )
 
365
  PCF_Set_Pixel_Size( FT_Size  size,
 
366
                      FT_UInt  pixel_width,
 
367
                      FT_UInt  pixel_height )
 
368
  {
 
369
    PCF_Face  face = (PCF_Face)FT_SIZE_FACE( size );
 
370
 
 
371
    FT_UNUSED( pixel_width );
 
372
    FT_UNUSED( pixel_height );
 
373
 
 
374
 
 
375
    FT_TRACE4(( "rec %d - pres %d\n", size->metrics.y_ppem,
 
376
                                      face->root.available_sizes->y_ppem >> 6 ));
 
377
 
 
378
    if ( size->metrics.y_ppem == face->root.available_sizes->y_ppem >> 6 )
 
379
    {
 
380
      size->metrics.ascender    = face->accel.fontAscent << 6;
 
381
      size->metrics.descender   = face->accel.fontDescent * (-64);
 
382
#if 0
 
383
      size->metrics.height      = face->accel.maxbounds.ascent << 6;
 
384
#endif
 
385
      size->metrics.height      = size->metrics.ascender -
 
386
                                  size->metrics.descender;
 
387
 
 
388
      size->metrics.max_advance = face->accel.maxbounds.characterWidth << 6;
 
389
 
 
390
      return PCF_Err_Ok;
 
391
    }
 
392
    else
 
393
    {
 
394
      FT_TRACE4(( "size WRONG\n" ));
 
395
      return PCF_Err_Invalid_Pixel_Size;
 
396
    }
 
397
  }
 
398
 
 
399
 
 
400
  FT_CALLBACK_DEF( FT_Error )
 
401
  PCF_Set_Point_Size( FT_Size     size,
 
402
                      FT_F26Dot6  char_width,
 
403
                      FT_F26Dot6  char_height,
 
404
                      FT_UInt     horz_resolution,
 
405
                      FT_UInt     vert_resolution )
 
406
  {
 
407
    FT_UNUSED( char_width );
 
408
    FT_UNUSED( char_height );
 
409
    FT_UNUSED( horz_resolution );
 
410
    FT_UNUSED( vert_resolution );
 
411
 
 
412
    return PCF_Set_Pixel_Size( size, 0, 0 );
 
413
  }
 
414
 
 
415
 
 
416
  FT_CALLBACK_DEF( FT_Error )
 
417
  PCF_Glyph_Load( FT_GlyphSlot  slot,
 
418
                  FT_Size       size,
 
419
                  FT_UInt       glyph_index,
 
420
                  FT_Int32      load_flags )
 
421
  {
 
422
    PCF_Face    face   = (PCF_Face)FT_SIZE_FACE( size );
 
423
    FT_Stream   stream = face->root.stream;
 
424
    FT_Error    error  = PCF_Err_Ok;
 
425
    FT_Bitmap*  bitmap = &slot->bitmap;
 
426
    PCF_Metric  metric;
 
427
    int         bytes;
 
428
 
 
429
    FT_UNUSED( load_flags );
 
430
 
 
431
 
 
432
    FT_TRACE4(( "load_glyph %d ---", glyph_index ));
 
433
 
 
434
    if ( !face )
 
435
    {
 
436
      error = PCF_Err_Invalid_Argument;
 
437
      goto Exit;
 
438
    }
 
439
 
 
440
    if ( glyph_index > 0 )
 
441
      glyph_index--;
 
442
 
 
443
    metric = face->metrics + glyph_index;
 
444
 
 
445
    bitmap->rows       = metric->ascent + metric->descent;
 
446
    bitmap->width      = metric->rightSideBearing - metric->leftSideBearing;
 
447
    bitmap->num_grays  = 1;
 
448
    bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
 
449
 
 
450
    FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
 
451
                  PCF_BIT_ORDER( face->bitmapsFormat ),
 
452
                  PCF_BYTE_ORDER( face->bitmapsFormat ),
 
453
                  PCF_GLYPH_PAD( face->bitmapsFormat ) ));
 
454
 
 
455
    switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) )
 
456
    {
 
457
    case 1:
 
458
      bitmap->pitch = ( bitmap->width + 7 ) >> 3;
 
459
      break;
 
460
 
 
461
    case 2:
 
462
      bitmap->pitch = ( ( bitmap->width + 15 ) >> 4 ) << 1;
 
463
      break;
 
464
 
 
465
    case 4:
 
466
      bitmap->pitch = ( ( bitmap->width + 31 ) >> 5 ) << 2;
 
467
      break;
 
468
 
 
469
    case 8:
 
470
      bitmap->pitch = ( ( bitmap->width + 63 ) >> 6 ) << 3;
 
471
      break;
 
472
 
 
473
    default:
 
474
      return PCF_Err_Invalid_File_Format;
 
475
    }
 
476
 
 
477
    /* XXX: to do: are there cases that need repadding the bitmap? */
 
478
    bytes = bitmap->pitch * bitmap->rows;
 
479
 
 
480
    error = ft_glyphslot_alloc_bitmap( slot, bytes );
 
481
    if ( error )
 
482
      goto Exit;
 
483
 
 
484
    if ( FT_STREAM_SEEK( metric->bits )          ||
 
485
         FT_STREAM_READ( bitmap->buffer, bytes ) )
 
486
      goto Exit;
 
487
 
 
488
    if ( PCF_BIT_ORDER( face->bitmapsFormat ) != MSBFirst )
 
489
      BitOrderInvert( bitmap->buffer, bytes );
 
490
 
 
491
    if ( ( PCF_BYTE_ORDER( face->bitmapsFormat ) !=
 
492
           PCF_BIT_ORDER( face->bitmapsFormat )  ) )
 
493
    {
 
494
      switch ( PCF_SCAN_UNIT( face->bitmapsFormat ) )
 
495
      {
 
496
      case 1:
 
497
        break;
 
498
 
 
499
      case 2:
 
500
        TwoByteSwap( bitmap->buffer, bytes );
 
501
        break;
 
502
 
 
503
      case 4:
 
504
        FourByteSwap( bitmap->buffer, bytes );
 
505
        break;
 
506
      }
 
507
    }
 
508
 
 
509
    slot->bitmap_left = metric->leftSideBearing;
 
510
    slot->bitmap_top  = metric->ascent;
 
511
 
 
512
    slot->metrics.horiAdvance  = metric->characterWidth << 6;
 
513
    slot->metrics.horiBearingX = metric->leftSideBearing << 6;
 
514
    slot->metrics.horiBearingY = metric->ascent << 6;
 
515
    slot->metrics.width        = ( metric->rightSideBearing -
 
516
                                   metric->leftSideBearing ) << 6;
 
517
    slot->metrics.height       = bitmap->rows << 6;
 
518
 
 
519
    slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
 
520
    slot->format            = FT_GLYPH_FORMAT_BITMAP;
 
521
 
 
522
    FT_TRACE4(( " --- ok\n" ));
 
523
 
 
524
  Exit:
 
525
    return error;
 
526
  }
 
527
 
 
528
 
 
529
 /*
 
530
  *
 
531
  *  BDF SERVICE
 
532
  *
 
533
  */
 
534
 
 
535
  static FT_Error
 
536
  pcf_get_bdf_property( PCF_Face          face,
 
537
                        const char*       prop_name,
 
538
                        BDF_PropertyRec  *aproperty )
 
539
  {
 
540
    PCF_Property  prop;
 
541
 
 
542
 
 
543
    prop = pcf_find_property( face, prop_name );
 
544
    if ( prop != NULL )
 
545
    {
 
546
      if ( prop->isString )
 
547
      {
 
548
        aproperty->type   = BDF_PROPERTY_TYPE_ATOM;
 
549
        aproperty->u.atom = prop->value.atom;
 
550
      }
 
551
      else
 
552
      {
 
553
        /* Apparently, the PCF driver loads all properties as signed integers!
 
554
         * This really doesn't seem to be a problem, because this is
 
555
         * sufficient for any meaningful values.
 
556
         */
 
557
        aproperty->type      = BDF_PROPERTY_TYPE_INTEGER;
 
558
        aproperty->u.integer = prop->value.integer;
 
559
      }
 
560
      return 0;
 
561
    }
 
562
 
 
563
    return PCF_Err_Invalid_Argument;
 
564
  }
 
565
 
 
566
 
 
567
  static FT_Error
 
568
  pcf_get_charset_id( PCF_Face      face,
 
569
                      const char*  *acharset_encoding,
 
570
                      const char*  *acharset_registry )
 
571
  {
 
572
    *acharset_encoding = face->charset_encoding;
 
573
    *acharset_registry = face->charset_registry;
 
574
 
 
575
    return 0;
 
576
  }
 
577
 
 
578
 
 
579
  static const FT_Service_BDFRec  pcf_service_bdf =
 
580
  {
 
581
    (FT_BDF_GetCharsetIdFunc)pcf_get_charset_id,
 
582
    (FT_BDF_GetPropertyFunc) pcf_get_bdf_property
 
583
  };
 
584
 
 
585
 
 
586
 /*
 
587
  *
 
588
  *  SERVICE LIST
 
589
  *
 
590
  */
 
591
 
 
592
  static const FT_ServiceDescRec  pcf_services[] =
 
593
  {
 
594
    { FT_SERVICE_ID_BDF,       &pcf_service_bdf },
 
595
    { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PCF },
 
596
    { NULL, NULL }
 
597
  };
 
598
 
 
599
 
 
600
  FT_CALLBACK_DEF( FT_Module_Interface )
 
601
  pcf_driver_requester( FT_Module    module,
 
602
                        const char*  name )
 
603
  {
 
604
    FT_UNUSED( module );
 
605
 
 
606
    return ft_service_list_lookup( pcf_services, name );
 
607
  }
 
608
 
 
609
 
 
610
  FT_CALLBACK_TABLE_DEF
 
611
  const FT_Driver_ClassRec  pcf_driver_class =
 
612
  {
 
613
    {
 
614
      FT_MODULE_FONT_DRIVER        |
 
615
      FT_MODULE_DRIVER_NO_OUTLINES,
 
616
      sizeof ( FT_DriverRec ),
 
617
 
 
618
      "pcf",
 
619
      0x10000L,
 
620
      0x20000L,
 
621
 
 
622
      0,
 
623
 
 
624
      0,
 
625
      0,
 
626
      pcf_driver_requester
 
627
    },
 
628
 
 
629
    sizeof ( PCF_FaceRec ),
 
630
    sizeof ( FT_SizeRec ),
 
631
    sizeof ( FT_GlyphSlotRec ),
 
632
 
 
633
    PCF_Face_Init,
 
634
    PCF_Face_Done,
 
635
    0,                      /* FT_Size_InitFunc */
 
636
    0,                      /* FT_Size_DoneFunc */
 
637
    0,                      /* FT_Slot_InitFunc */
 
638
    0,                      /* FT_Slot_DoneFunc */
 
639
 
 
640
    PCF_Set_Point_Size,
 
641
    PCF_Set_Pixel_Size,
 
642
 
 
643
    PCF_Glyph_Load,
 
644
 
 
645
    0,                      /* FT_Face_GetKerningFunc  */
 
646
    0,                      /* FT_Face_AttachFunc      */
 
647
    0                       /* FT_Face_GetAdvancesFunc */
 
648
  };
 
649
 
 
650
 
 
651
/* END */