sl@0: // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef SHAPEIMPL_H_ sl@0: #define SHAPEIMPL_H_ sl@0: sl@0: #include sl@0: sl@0: /**@file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: class CFont; sl@0: class TDesC16; sl@0: sl@0: const TUid KFontGetShaping = {0x10274246}; sl@0: const TUid KFontDeleteShaping = {0x102744D7}; sl@0: sl@0: /** Internal class describing shaping information. */ sl@0: class TShapeHeader sl@0: { sl@0: public: sl@0: /** Number of glyphs output. */ sl@0: TInt iGlyphCount; sl@0: /** Number of characters consumed from the input. */ sl@0: TInt iCharacterCount; sl@0: /** Reserved for future expansion. */ sl@0: TInt iReserved0; sl@0: /** Reserved for future expansion. */ sl@0: TInt iReserved1; sl@0: /** The glyph, position and indices data. sl@0: sl@0: The first iGlyphCount * 4 bytes contain the glyph codes sl@0: as 2-byte values. The next iGlyphCount * 4 + 4 bytes contain the sl@0: positions in which these glyphs are to be drawn, in pixels, taking sl@0: the original pen position as origin, with the x axis going right and sl@0: the y axis going down. The next iGlyphCount * 2 bytes contain the sl@0: indices of the characters in the input string that correspond to the sl@0: glyphs in the output. sl@0: sl@0: The final entry in the position array is the total advance of the text. sl@0: sl@0: Therefore this buffer is actually iGlyphCount * 10 + 4 bytes long. */ sl@0: TInt8 iBuffer[1]; sl@0: }; sl@0: sl@0: /** For CFont::ExtendedFunctions aParam argument, with KFontGetShaping sl@0: function ID. */ sl@0: class TFontShapeFunctionParameters sl@0: { sl@0: public: sl@0: /** The text, including context. */ sl@0: const TDesC16* iText; sl@0: /** The start of the meat within iText. */ sl@0: TInt iStart; sl@0: /** The end of the meat within iText. */ sl@0: TInt iEnd; sl@0: /** Script code. */ sl@0: TInt iScript; sl@0: /** Language code. 0 for default. */ sl@0: TInt iLanguage; sl@0: /** Output from the shaper; a TShapeHeader on the shared heap. */ sl@0: const TShapeHeader* iShapeHeaderOutput; sl@0: }; sl@0: sl@0: /** For CFont::ExtendedFunctions aParam argument, with KFontDeleteShaping sl@0: function ID. */ sl@0: class TFontShapeDeleteFunctionParameters sl@0: { sl@0: public: sl@0: const TShapeHeader* iShapeHeader; sl@0: }; sl@0: sl@0: #endif