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

« back to all changes in this revision

Viewing changes to src/3rdparty/freetype/src/autofit/afmodule.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
#include "afmodule.h"
 
2
#include "afloader.h"
 
3
#include FT_INTERNAL_OBJECTS_H
 
4
 
 
5
  typedef struct  FT_AutofitterRec_
 
6
  {
 
7
    FT_ModuleRec  root;
 
8
    AF_LoaderRec  loader[1];
 
9
 
 
10
  } FT_AutofitterRec, *FT_Autofitter;
 
11
 
 
12
 
 
13
  FT_CALLBACK_DEF( FT_Error )
 
14
  af_autofitter_init( FT_Autofitter  module )
 
15
  {
 
16
    return af_loader_init( module->loader, module->root.library->memory );
 
17
  }
 
18
 
 
19
 
 
20
  FT_CALLBACK_DEF( void )
 
21
  af_autofitter_done( FT_Autofitter  module )
 
22
  {
 
23
    af_loader_done( module->loader );
 
24
  }
 
25
 
 
26
 
 
27
  FT_CALLBACK_DEF( FT_Error )
 
28
  af_autofitter_load_glyph( FT_Autofitter  module,
 
29
                            FT_GlyphSlot   slot,
 
30
                            FT_Size        size,
 
31
                            FT_UInt        glyph_index,
 
32
                            FT_Int32       load_flags )
 
33
  {
 
34
    FT_UNUSED( size );
 
35
 
 
36
    return af_loader_load_glyph( module->loader, slot->face,
 
37
                                 glyph_index, load_flags );
 
38
  }
 
39
 
 
40
 
 
41
 
 
42
  FT_CALLBACK_TABLE_DEF
 
43
  const FT_AutoHinter_ServiceRec  af_autofitter_service =
 
44
  {
 
45
    NULL,
 
46
    NULL,
 
47
    NULL,
 
48
    (FT_AutoHinter_GlyphLoadFunc) af_autofitter_load_glyph
 
49
  };
 
50
 
 
51
 
 
52
  FT_CALLBACK_TABLE_DEF
 
53
  const FT_Module_Class  autofit_module_class =
 
54
  {
 
55
    FT_MODULE_HINTER,
 
56
    sizeof ( FT_AutofitterRec ),
 
57
 
 
58
    "autofitter",
 
59
    0x10000L,   /* version 1.0 of the autofitter  */
 
60
    0x20000L,   /* requires FreeType 2.0 or above */
 
61
 
 
62
    (const void*) &af_autofitter_service,
 
63
 
 
64
    (FT_Module_Constructor) af_autofitter_init,
 
65
    (FT_Module_Destructor)  af_autofitter_done,
 
66
    (FT_Module_Requester)   0
 
67
  };
 
68
 
 
69
 
 
70
/* END */