Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * SymbianFontInstance.CPP
16 * Symbian implementation of LEFontInstance
21 #ifndef SYMBIANFontInstance_H_
22 #define SYMBIANFontInstance_H_
26 #include "layout/LETypes.h"
27 #include "layout/LEFontInstance.h"
29 #include "FontTableCache.h"
37 class MOpenFontExtensionInterface;
39 class SymbianFontInstance : public LEFontInstance, protected FontTableCache
42 SymbianFontInstance(CBitmapFont* aBitmapFont, LEErrorCode &status, le_bool aKeepGlyphOfZWJ = false);
43 virtual ~SymbianFontInstance();
44 void SetSessionHandle(TInt aHandle)
46 iSessionHandle = aHandle;
49 const void *getFontTable(LETag tableTag) const;
51 le_int32 getUnitsPerEM() const
56 le_int32 getAscent() const
61 le_int32 getDescent() const
66 le_int32 getLeading() const
71 LEGlyphID mapCharToGlyph(LEUnicode32 ch) const
74 if (ch == 0x200D && !iKeepGlyphOfZWJ)
78 return fCMAPMapper->unicodeToGlyph(ch);
81 void getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) const;
83 le_bool getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LEPoint &point) const;
85 void transformFunits(float xFunits, float yFunits, LEPoint &pixels) const;
86 float xUnitsToPoints(float xUnits) const;
87 float yUnitsToPoints(float yUnits) const;
88 float getXPixelsPerEm() const;
89 float getYPixelsPerEm() const;
90 float getScaleFactorX() const;
91 float getScaleFactorY() const;
94 const void *readFontTable(LETag tableTag) const;
104 const SFNTDirectory *fDirectory;
114 CMAPMapper *fCMAPMapper;
116 const HMTXTable *fHMTXTable;
117 le_uint16 fNumGlyphs;
118 le_uint16 fNumLongHorMetrics;
121 MOpenFontShapingExtension* iExtensionInterface;
122 MOpenFontTrueTypeExtension* iTrueTypeExtensionInterface;
125 // --> 1922 mlyl: The script which this shaper will shape
126 le_bool iKeepGlyphOfZWJ;
129 static le_int8 highBit(le_int32 value);
131 const DirectoryEntry *findTable(LETag tag) const;
132 const void *readTable(LETag tag, le_uint32 *length) const;
133 void deleteTable(const void *table) const;
136 CMAPMapper *findUnicodeMapper();