]>
git.saurik.com Git - apple/icu.git/blob - icuSources/samples/layout/cmaps.h
2 ****************************************************************************** *
4 * Copyright (C) 1999-2003, International Business Machines
5 * Corporation and others. All Rights Reserved.
7 ****************************************************************************** *
10 * created on: ??/??/2001
11 * created by: Eric R. Mader
17 #include "layout/LETypes.h"
23 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const = 0;
25 virtual ~CMAPMapper();
27 static CMAPMapper
*createUnicodeMapper(const CMAPTable
*cmap
);
30 CMAPMapper(const CMAPTable
*cmap
);
35 const CMAPTable
*fcmap
;
38 class CMAPFormat4Mapper
: public CMAPMapper
41 CMAPFormat4Mapper(const CMAPTable
*cmap
, const CMAPFormat4Encoding
*header
);
43 virtual ~CMAPFormat4Mapper();
45 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const;
48 CMAPFormat4Mapper() {};
51 le_uint16 fEntrySelector
;
52 le_uint16 fRangeShift
;
53 const le_uint16
*fEndCodes
;
54 const le_uint16
*fStartCodes
;
55 const le_uint16
*fIdDelta
;
56 const le_uint16
*fIdRangeOffset
;
59 class CMAPGroupMapper
: public CMAPMapper
62 CMAPGroupMapper(const CMAPTable
*cmap
, const CMAPGroup
*groups
, le_uint32 nGroups
);
64 virtual ~CMAPGroupMapper();
66 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const;
73 le_int32 fRangeOffset
;
74 const CMAPGroup
*fGroups
;
77 inline CMAPMapper::CMAPMapper(const CMAPTable
*cmap
)
83 inline CMAPMapper::~CMAPMapper()
85 LE_DELETE_ARRAY(fcmap
);