]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/perf/leperf/cmaps.h
1 /**************************************************************************
3 * © 2016 and later: Unicode, Inc. and others.
4 * License & terms of use: http://www.unicode.org/copyright.html#License
6 ***************************************************************************
7 ***************************************************************************
9 * Copyright (C) 1998-2013, International Business Machines
10 * Corporation and others. All Rights Reserved.
12 ************************************************************************/
18 #include "layout/LETypes.h"
25 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const = 0;
27 virtual ~CMAPMapper();
29 static CMAPMapper
*createUnicodeMapper(const CMAPTable
*cmap
);
32 CMAPMapper(const CMAPTable
*cmap
);
37 const CMAPTable
*fcmap
;
40 class CMAPFormat4Mapper
: public CMAPMapper
43 CMAPFormat4Mapper(const CMAPTable
*cmap
, const CMAPFormat4Encoding
*header
);
45 virtual ~CMAPFormat4Mapper();
47 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const;
50 CMAPFormat4Mapper() {};
53 le_uint16 fEntrySelector
;
54 le_uint16 fRangeShift
;
55 const le_uint16
*fEndCodes
;
56 const le_uint16
*fStartCodes
;
57 const le_uint16
*fIdDelta
;
58 const le_uint16
*fIdRangeOffset
;
61 class CMAPGroupMapper
: public CMAPMapper
64 CMAPGroupMapper(const CMAPTable
*cmap
, const CMAPGroup
*groups
, le_uint32 nGroups
);
66 virtual ~CMAPGroupMapper();
68 virtual LEGlyphID
unicodeToGlyph(LEUnicode32 unicode32
) const;
75 le_int32 fRangeOffset
;
76 const CMAPGroup
*fGroups
;
79 inline CMAPMapper::CMAPMapper(const CMAPTable
*cmap
)
85 inline CMAPMapper::~CMAPMapper()
87 LE_DELETE_ARRAY(fcmap
);