First public contribution.
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Contains utility classes/functions which are
15 // shared across multiple test steps.
17 #ifndef GRAPHICSFONTUTILS_H
18 #define GRAPHICSFONTUTILS_H
23 class MOpenFontShapingExtension;
27 Helper class that converts a character code to a glyph code.
28 To do this requires calling into a font rasterizer from this
29 process, therefore the rasterizer must be loaded in this
30 process - to do this it must create its own fontstore and load
31 its own instance of a font rasterizer. This class performs
32 no shaping of characters.
34 @note This class and/or its implementation should not be
35 copied or used as refernce code - the proper implementation
36 would not create a new fontstore, but instead either parse the
37 font table of the associated font itself, or use the
38 FBS server-side fontstore.
40 class CCharCodeConverter : public CBase
43 IMPORT_C static CCharCodeConverter* NewL();
44 IMPORT_C static CCharCodeConverter* NewLC();
45 IMPORT_C ~CCharCodeConverter();
46 IMPORT_C void UseFontL(CFbsFont* aFont);
47 IMPORT_C TInt GlyphCodeL(TInt aCharCode) const;
51 void LoadOpenFontLibraries(CFontStore* aFontStore);
53 CFontStore* iFontStore;
55 MOpenFontShapingExtension* iGlyphIndexExt;
58 #endif // GRAPHICSFONTUTILS_H