1 /*******************************************************************
5 * TrueType Character Mappings
7 * Copyright 1996-1999 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
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.
17 ******************************************************************/
37 typedef struct TCMap0_ TCMap0
;
38 typedef TCMap0
* PCMap0
;
43 struct TCMap2SubHeader_
45 UShort firstCode
; /* first valid low byte */
46 UShort entryCount
; /* number of valid low bytes */
47 Short idDelta
; /* delta value to glyphIndex */
48 UShort idRangeOffset
; /* offset from here to 1st code */
51 typedef struct TCMap2SubHeader_ TCMap2SubHeader
;
52 typedef TCMap2SubHeader
* PCMap2SubHeader
;
56 PUShort subHeaderKeys
;
57 /* high byte mapping table */
58 /* value = subHeader index * 8 */
60 PCMap2SubHeader subHeaders
;
62 UShort numGlyphId
; /* control value */
65 typedef struct TCMap2_ TCMap2
;
66 typedef TCMap2
* PCMap2
;
75 Short idDelta
; /* in the specs defined as UShort but the
76 example there gives negative values... */
80 typedef struct TCMap4Segment_ TCMap4Segment
;
81 typedef TCMap4Segment
* PCMap4Segment
;
85 UShort segCountX2
; /* number of segments * 2 */
86 UShort searchRange
; /* these parameters can be used */
87 UShort entrySelector
; /* for a binary search */
90 PCMap4Segment segments
;
92 UShort numGlyphId
; /* control value */
95 typedef struct TCMap4_ TCMap4
;
96 typedef TCMap4
* PCMap4
;
103 UShort firstCode
; /* first character code of subrange */
104 UShort entryCount
; /* number of character codes in subrange */
106 PUShort glyphIdArray
;
109 typedef struct TCMap6_ TCMap6
;
110 typedef TCMap6
* PCMap6
;
118 UShort platformEncodingID
;
135 typedef struct TCMapTable_ TCMapTable
;
136 typedef TCMapTable
* PCMapTable
;
140 /* Load character mappings directory when face is loaded. */
141 /* The mappings themselves are only loaded on demand. */
144 TT_Error
CharMap_Load( PCMapTable table
,
148 /* Destroy one character mapping table */
151 TT_Error
CharMap_Free( PCMapTable table
);
154 /* Use character mapping table to perform mapping */
157 UShort
CharMap_Index( PCMapTable cmap
,
160 /* NOTE: The PFace type isn't defined at this point */
166 #endif /* TTCMAP_H */