xref: /inferno-os/libfreetype/ttcmap0.h (revision 37da2899f40661e3e9631e497da8dc59b971cbd0)
1 /***************************************************************************/
2 /*                                                                         */
3 /*  ttcmap0.h                                                              */
4 /*                                                                         */
5 /*    TrueType new character mapping table (cmap) support (specification). */
6 /*                                                                         */
7 /*  Copyright 2002 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 __TTCMAP0_H__
20 #define __TTCMAP0_H__
21 
22 
23 #include <ft2build.h>
24 #include FT_INTERNAL_TRUETYPE_TYPES_H
25 #include FT_INTERNAL_OBJECTS_H
26 
27 
28 FT_BEGIN_HEADER
29 
30   typedef struct  TT_CMapRec_
31   {
32     FT_CMapRec  cmap;
33     FT_Byte*    data;           /* pointer to in-memory cmap table */
34 
35   } TT_CMapRec, *TT_CMap;
36 
37   typedef const struct TT_CMap_ClassRec_*  TT_CMap_Class;
38 
39 
40   typedef FT_Error
41   (*TT_CMap_ValidateFunc)( FT_Byte*      data,
42                            FT_Validator  valid );
43 
44   typedef struct  TT_CMap_ClassRec_
45   {
46     FT_CMap_ClassRec      clazz;
47     FT_UInt               format;
48     TT_CMap_ValidateFunc  validate;
49 
50   } TT_CMap_ClassRec;
51 
52 
53   typedef struct  TT_ValidatorRec_
54   {
55     FT_ValidatorRec  validator;
56     FT_UInt          num_glyphs;
57 
58   } TT_ValidatorRec, *TT_Validator;
59 
60 
61 #define TT_VALIDATOR( x )          ((TT_Validator)( x ))
62 #define TT_VALID_GLYPH_COUNT( x )  TT_VALIDATOR( x )->num_glyphs
63 
64 
65   FT_LOCAL( FT_Error )
66   tt_face_build_cmaps( TT_Face  face );
67 
68 
69 FT_END_HEADER
70 
71 #endif /* __TTCMAP0_H__ */
72 
73 
74 /* END */
75