Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
ttcmap.h
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* ttcmap.h */
4 /* */
5 /* TrueType character mapping table (cmap) support (specification). */
6 /* */
7 /* Copyright 2002-2005, 2009, 2012 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 __TTCMAP_H__
20 #define __TTCMAP_H__
21 
22 
23 #include <ft2build.h>
24 #include FT_INTERNAL_TRUETYPE_TYPES_H
25 #include FT_INTERNAL_VALIDATE_H
26 #include FT_SERVICE_TT_CMAP_H
27 
29 
30 
31 #define TT_CMAP_FLAG_UNSORTED 1
32 #define TT_CMAP_FLAG_OVERLAPPING 2
33 
34  typedef struct TT_CMapRec_
35  {
37  FT_Byte* data; /* pointer to in-memory cmap table */
38  FT_Int flags; /* for format 4 only */
39 
40  } TT_CMapRec, *TT_CMap;
41 
42  typedef const struct TT_CMap_ClassRec_* TT_CMap_Class;
43 
44 
45  typedef FT_Error
47  FT_Validator valid );
48 
49  typedef struct TT_CMap_ClassRec_
50  {
55 
57 
58 
59 #ifndef FT_CONFIG_OPTION_PIC
60 
61 #define FT_DEFINE_TT_CMAP( class_, \
62  size_, \
63  init_, \
64  done_, \
65  char_index_, \
66  char_next_, \
67  char_var_index_, \
68  char_var_default_, \
69  variant_list_, \
70  charvariant_list_, \
71  variantchar_list_, \
72  format_, \
73  validate_, \
74  get_cmap_info_ ) \
75  FT_CALLBACK_TABLE_DEF \
76  const TT_CMap_ClassRec class_ = \
77  { \
78  { size_, \
79  init_, \
80  done_, \
81  char_index_, \
82  char_next_, \
83  char_var_index_, \
84  char_var_default_, \
85  variant_list_, \
86  charvariant_list_, \
87  variantchar_list_ \
88  }, \
89  \
90  format_, \
91  validate_, \
92  get_cmap_info_ \
93  };
94 
95 #else /* FT_CONFIG_OPTION_PIC */
96 
97 #define FT_DEFINE_TT_CMAP( class_, \
98  size_, \
99  init_, \
100  done_, \
101  char_index_, \
102  char_next_, \
103  char_var_index_, \
104  char_var_default_, \
105  variant_list_, \
106  charvariant_list_, \
107  variantchar_list_, \
108  format_, \
109  validate_, \
110  get_cmap_info_ ) \
111  void \
112  FT_Init_Class_ ## class_( TT_CMap_ClassRec* clazz ) \
113  { \
114  clazz->clazz.size = size_; \
115  clazz->clazz.init = init_; \
116  clazz->clazz.done = done_; \
117  clazz->clazz.char_index = char_index_; \
118  clazz->clazz.char_next = char_next_; \
119  clazz->clazz.char_var_index = char_var_index_; \
120  clazz->clazz.char_var_default = char_var_default_; \
121  clazz->clazz.variant_list = variant_list_; \
122  clazz->clazz.charvariant_list = charvariant_list_; \
123  clazz->clazz.variantchar_list = variantchar_list_; \
124  clazz->format = format_; \
125  clazz->validate = validate_; \
126  clazz->get_cmap_info = get_cmap_info_; \
127  }
128 
129 #endif /* FT_CONFIG_OPTION_PIC */
130 
131 
132  typedef struct TT_ValidatorRec_
133  {
136 
138 
139 
140 #define TT_VALIDATOR( x ) ( (TT_Validator)( x ) )
141 #define TT_VALID_GLYPH_COUNT( x ) TT_VALIDATOR( x )->num_glyphs
142 
143 
144  FT_LOCAL( FT_Error )
146 
147  /* used in tt-cmaps service */
148  FT_LOCAL( FT_Error )
149  tt_get_cmap_info( FT_CharMap charmap,
151 
152 
154 
155 #endif /* __TTCMAP_H__ */
156 
157 
158 /* END */
int FT_Error
Definition: fttypes.h:296
#define FT_END_HEADER
Definition: ftheader.h:54
FT_Error(* TT_CMap_ValidateFunc)(FT_Byte *data, FT_Validator valid)
Definition: ttcmap.h:46
signed int FT_Int
Definition: fttypes.h:216
tt_get_cmap_info(FT_CharMap charmap, TT_CMapInfo *cmap_info)
Definition: ttcmap.c:3546
FT_CMapRec cmap
Definition: ttcmap.h:36
TT_CMap_ValidateFunc validate
Definition: ttcmap.h:53
GLenum GLuint GLint GLenum face
TT_CMap_Info_GetFunc get_cmap_info
Definition: ttcmap.h:54
TT_CMapInfo * cmap_info
Definition: cffdrivr.c:409
const struct TT_CMap_ClassRec_ * TT_CMap_Class
Definition: ttcmap.h:42
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
struct TT_ValidatorRec_ TT_ValidatorRec
#define FT_LOCAL(x)
Definition: ftconfig.h:235
typedefFT_BEGIN_HEADER struct FT_ValidatorRec_ volatile * FT_Validator
Definition: ftvalid.h:42
FT_CMap_ClassRec clazz
Definition: ttcmap.h:51
FT_ValidatorRec validator
Definition: ttcmap.h:134
struct TT_CMap_ClassRec_ TT_CMap_ClassRec
struct TT_CMapRec_ TT_CMapRec
FT_Error(* TT_CMap_Info_GetFunc)(FT_CharMap charmap, TT_CMapInfo *cmap_info)
Definition: svttcmap.h:68
struct TT_CMapRec_ * TT_CMap
FT_Int flags
Definition: ttcmap.h:38
FT_UInt num_glyphs
Definition: ttcmap.h:135
unsigned int FT_UInt
Definition: fttypes.h:227
tt_face_build_cmaps(TT_Face face)
Definition: ttcmap.c:3433
struct TT_ValidatorRec_ * TT_Validator
FT_Byte * data
Definition: ttcmap.h:37
FT_UInt format
Definition: ttcmap.h:52