Update contrib.
2 * Copyright (c) 2007-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 * Tests FNTSTORE with respect to the Open Font system.
16 * Creates a dummy rasterizer and tests font file loading and unloading and
17 * font creation. This just exercises the way the Open Font system connects to the
18 * 'classic' bitmap-font-only font system.
23 #ifndef __T_FSOPEN_H__
24 #define __T_FSOPEN_H__
29 #include "TGraphicsHarness.h"
30 #include <graphics/openfontrasterizer.h>
32 class CTFsOpen : public CTGraphicsBase
35 CTFsOpen(CTestStep* aStep);
39 virtual void RunTestCaseL(TInt aCurTestCase);
40 virtual void ConstructL();
42 void TestFont(const TFontSpec& aSpec);
43 void AddAndRemoveFilesL();
44 void CreateAndReleaseFontsL();
47 void TestGetNearestFontHelperL();
51 CFontStore* iFontStore;
55 class CTFsOpenStep : public CTGraphicsStep
61 virtual CTGraphicsBase* CreateTestL();
62 virtual void TestSetupL();
65 _LIT(KTFsOpenStep,"TFsOpen");
68 // make dummy font rasterizer available to t_fntmem
70 class CDummyRasterizer: public COpenFontRasterizer
73 static CDummyRasterizer* NewL();
74 // virtual function from COpenFontRasterizer
75 COpenFontFile* NewFontFileL(TInt aUid,const TDesC& aFileName,RFs& aFileSession);
78 // dummy shaper factory to create dummy shaper
80 class CDummyShaperFactory: public CShaperFactory
83 static CDummyShaperFactory* NewL();
84 virtual ~CDummyShaperFactory();
85 virtual CShaper* NewShaperL(CBitmapFont* aBitmapfont, TInt aScript, TInt aLanguage, RHeap* aHeap);
88 CDummyShaperFactory();
94 class CDummyShaper : public CShaper
98 static CShaper* NewL(CBitmapFont* aBitmapfont, TInt aScript, TInt aLanguage, RHeap* aHeap);
101 virtual TInt ShapeText(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
105 TInt ConstructL(CBitmapFont* aBitmapfont, TInt aScript, TInt aLanguage, RHeap* iHeap);
107 // leaving version of shaping method
108 TInt DummyShapeTextL(TShapeHeader*& aOutput, const TInput& aInput, RHeap* aHeapForOutput);
110 // the client heap pointer passed in during construction
113 // the private heap used by the shaper
116 // memory allocated for the private heap
119 // buffers used to hold results from the Icu Layout engine