~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tests/freetype/include/freetype/internal/services/svgldict.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-02 13:11:51 UTC
  • Revision ID: package-import@ubuntu.com-20130502131151-q8dvteqr1ef2x7xz
Tags: upstream-1.4.1~20130504~adb56cb
ImportĀ upstreamĀ versionĀ 1.4.1~20130504~adb56cb

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************/
 
2
/*                                                                         */
 
3
/*  svgldict.h                                                             */
 
4
/*                                                                         */
 
5
/*    The FreeType glyph dictionary services (specification).              */
 
6
/*                                                                         */
 
7
/*  Copyright 2003 by                                                      */
 
8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 
9
/*                                                                         */
 
10
/*  This file is part of the FreeType project, and may only be used,       */
 
11
/*  modified, and distributed under the terms of the FreeType project      */
 
12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 
13
/*  this file you indicate that you have read the license and              */
 
14
/*  understand and accept it fully.                                        */
 
15
/*                                                                         */
 
16
/***************************************************************************/
 
17
 
 
18
 
 
19
#ifndef __SVGLDICT_H__
 
20
#define __SVGLDICT_H__
 
21
 
 
22
#include FT_INTERNAL_SERVICE_H
 
23
 
 
24
 
 
25
FT_BEGIN_HEADER
 
26
 
 
27
 
 
28
  /*
 
29
   *  A service used to retrieve glyph names, as well as to find the
 
30
   *  index of a given glyph name in a font.
 
31
   *
 
32
   */
 
33
 
 
34
#define FT_SERVICE_ID_GLYPH_DICT  "glyph-dict"
 
35
 
 
36
 
 
37
  typedef FT_Error
 
38
  (*FT_GlyphDict_GetNameFunc)( FT_Face     face,
 
39
                               FT_UInt     glyph_index,
 
40
                               FT_Pointer  buffer,
 
41
                               FT_UInt     buffer_max );
 
42
 
 
43
  typedef FT_UInt
 
44
  (*FT_GlyphDict_NameIndexFunc)( FT_Face     face,
 
45
                                 FT_String*  glyph_name );
 
46
 
 
47
 
 
48
  FT_DEFINE_SERVICE( GlyphDict )
 
49
  {
 
50
    FT_GlyphDict_GetNameFunc    get_name;
 
51
    FT_GlyphDict_NameIndexFunc  name_index;  /* optional */
 
52
  };
 
53
 
 
54
#ifndef FT_CONFIG_OPTION_PIC
 
55
 
 
56
#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \
 
57
  static const FT_Service_GlyphDictRec class_ =                        \
 
58
  {                                                                    \
 
59
    get_name_, name_index_                                             \
 
60
  };
 
61
 
 
62
#else /* FT_CONFIG_OPTION_PIC */ 
 
63
 
 
64
#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \
 
65
  void                                                                 \
 
66
  FT_Init_Class_##class_( FT_Library library,                          \
 
67
                          FT_Service_GlyphDictRec* clazz)              \
 
68
  {                                                                    \
 
69
    FT_UNUSED(library);                                                \
 
70
    clazz->get_name = get_name_;                                       \
 
71
    clazz->name_index = name_index_;                                   \
 
72
  } 
 
73
 
 
74
#endif /* FT_CONFIG_OPTION_PIC */ 
 
75
 
 
76
  /* */
 
77
 
 
78
 
 
79
FT_END_HEADER
 
80
 
 
81
 
 
82
#endif /* __SVGLDICT_H__ */