1 /***************************************************************************
3 * Copyright (C) 1998-2006, International Business Machines
4 * Corporation and others. All Rights Reserved.
6 ************************************************************************/
12 #include "layout/LETypes.h"
21 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const = 0;
23 virtual ~CMAPMapper();
25 static CMAPMapper *createUnicodeMapper(const CMAPTable *cmap);
28 CMAPMapper(const CMAPTable *cmap);
33 const CMAPTable *fcmap;
36 class CMAPFormat4Mapper : public CMAPMapper
39 CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header);
41 virtual ~CMAPFormat4Mapper();
43 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
46 CMAPFormat4Mapper() {};
49 le_uint16 fEntrySelector;
50 le_uint16 fRangeShift;
51 const le_uint16 *fEndCodes;
52 const le_uint16 *fStartCodes;
53 const le_uint16 *fIdDelta;
54 const le_uint16 *fIdRangeOffset;
57 class CMAPGroupMapper : public CMAPMapper
60 CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups);
62 virtual ~CMAPGroupMapper();
64 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
71 le_int32 fRangeOffset;
72 const CMAPGroup *fGroups;
75 inline CMAPMapper::CMAPMapper(const CMAPTable *cmap)
81 inline CMAPMapper::~CMAPMapper()