#ifndef TTCMAP_H
#define TTCMAP_H
#include "ttconfig.h"
#include "tttypes.h"
#ifdef __cplusplus
extern "C" {
#endif
struct TCMap0_
{
PByte glyphIdArray;
};
typedef struct TCMap0_ TCMap0;
typedef TCMap0* PCMap0;
struct TCMap2SubHeader_
{
UShort firstCode;
UShort entryCount;
Short idDelta;
UShort idRangeOffset;
};
typedef struct TCMap2SubHeader_ TCMap2SubHeader;
typedef TCMap2SubHeader* PCMap2SubHeader;
struct TCMap2_
{
PUShort subHeaderKeys;
PCMap2SubHeader subHeaders;
PUShort glyphIdArray;
UShort numGlyphId;
};
typedef struct TCMap2_ TCMap2;
typedef TCMap2* PCMap2;
struct TCMap4Segment_
{
UShort endCount;
UShort startCount;
Short idDelta;
UShort idRangeOffset;
};
typedef struct TCMap4Segment_ TCMap4Segment;
typedef TCMap4Segment* PCMap4Segment;
struct TCMap4_
{
UShort segCountX2;
UShort searchRange;
UShort entrySelector;
UShort rangeShift;
PCMap4Segment segments;
PUShort glyphIdArray;
UShort numGlyphId;
};
typedef struct TCMap4_ TCMap4;
typedef TCMap4* PCMap4;
struct TCMap6_
{
UShort firstCode;
UShort entryCount;
PUShort glyphIdArray;
};
typedef struct TCMap6_ TCMap6;
typedef TCMap6* PCMap6;
struct TCMapTable_
{
UShort platformID;
UShort platformEncodingID;
UShort format;
UShort length;
UShort version;
Bool loaded;
ULong offset;
union
{
TCMap0 cmap0;
TCMap2 cmap2;
TCMap4 cmap4;
TCMap6 cmap6;
} c;
};
typedef struct TCMapTable_ TCMapTable;
typedef TCMapTable* PCMapTable;
#if !defined(FTXCMAP_H) && !defined(FTXSBIT_H)
LOCAL_DEF
TT_Error CharMap_Load( PCMapTable table,
TT_Stream input );
LOCAL_DEF
TT_Error CharMap_Free( PCMapTable table );
LOCAL_DEF
UShort CharMap_Index( PCMapTable cmap,
UShort charCode );
#endif
#ifdef __cplusplus
}
#endif
#endif