]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/letest/cmaps.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /***************************************************************************
5 * Copyright (C) 1998-2013, International Business Machines
6 * Corporation and others. All Rights Reserved.
8 ************************************************************************/
14 #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()
83 LE_DELETE_ARRAY(fcmap
);