2 ******************************************************************************
4 * Copyright (C) 2016 and later: Unicode, Inc. and others.
5 * License & terms of use: http://www.unicode.org/copyright.html#License
7 ******************************************************************************
8 ****************************************************************************** *
10 * Copyright (C) 1999-2003, International Business Machines
11 * Corporation and others. All Rights Reserved.
13 ****************************************************************************** *
16 * created on: ??/??/2001
17 * created by: Eric R. Mader
23 #include "layout/LETypes.h"
29 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const = 0;
31 virtual ~CMAPMapper();
33 static CMAPMapper *createUnicodeMapper(const CMAPTable *cmap);
36 CMAPMapper(const CMAPTable *cmap);
41 const CMAPTable *fcmap;
44 class CMAPFormat4Mapper : public CMAPMapper
47 CMAPFormat4Mapper(const CMAPTable *cmap, const CMAPFormat4Encoding *header);
49 virtual ~CMAPFormat4Mapper();
51 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
54 CMAPFormat4Mapper() {};
57 le_uint16 fEntrySelector;
58 le_uint16 fRangeShift;
59 const le_uint16 *fEndCodes;
60 const le_uint16 *fStartCodes;
61 const le_uint16 *fIdDelta;
62 const le_uint16 *fIdRangeOffset;
65 class CMAPGroupMapper : public CMAPMapper
68 CMAPGroupMapper(const CMAPTable *cmap, const CMAPGroup *groups, le_uint32 nGroups);
70 virtual ~CMAPGroupMapper();
72 virtual LEGlyphID unicodeToGlyph(LEUnicode32 unicode32) const;
79 le_int32 fRangeOffset;
80 const CMAPGroup *fGroups;
83 inline CMAPMapper::CMAPMapper(const CMAPTable *cmap)
89 inline CMAPMapper::~CMAPMapper()
91 LE_DELETE_ARRAY(fcmap);