1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/fbs/fontandbitmapserver/tfbs/tfonttableandglyph.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,93 @@
1.4 +// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef TFONTTABLEANDGLYPH_H_
1.20 +#define TFONTTABLEANDGLYPH_H_
1.21 +
1.22 +#include <gdi.h>
1.23 +#include "test/TGraphicsHarness.h"
1.24 +
1.25 +class CTFontAndGlyphStep : public CTGraphicsStep
1.26 + {
1.27 +public:
1.28 + CTFontAndGlyphStep();
1.29 +protected:
1.30 + //from CTGraphicsStep
1.31 + virtual CTGraphicsBase* CreateTestL();
1.32 + };
1.33 +
1.34 +_LIT(KTFontTableAndGlyphStep,"TFontTableAndGlyphOutline");
1.35 +
1.36 +
1.37 +
1.38 +class CFbsTestForFont: public CFbsFont
1.39 + {
1.40 +public:
1.41 + CFbsTestForFont():CFbsFont() { }
1.42 + void Duplicate(TInt aFontHandle) {CFbsFont::Duplicate(aFontHandle);}
1.43 + void SetHandle(TInt aHandle) { iHandle = aHandle; }
1.44 + TInt ClientHandle(){return iHandle;};
1.45 + ~CFbsTestForFont() { iHandle = 0; }
1.46 + };
1.47 +
1.48 +
1.49 +
1.50 +
1.51 +class CTFontAndGlyph : public CTGraphicsBase
1.52 + {
1.53 +
1.54 +public:
1.55 + CTFontAndGlyph(CTestStep* aStep);
1.56 + ~CTFontAndGlyph();
1.57 +
1.58 +protected:
1.59 +//from CTGraphicsStep
1.60 + virtual void RunTestCaseL(TInt aCurTestCase);
1.61 +
1.62 +private:
1.63 + void ConstructL();
1.64 + void CleanEnv();
1.65 +
1.66 + void GetHintedGlyphById();
1.67 + void GetUnHintedGlyphById();
1.68 + void GetHintedGlyphByWrongId();
1.69 + void GetGlyphWithNoMem();
1.70 + void GetFontTable();
1.71 + void GetFontTableByWrongTag();
1.72 + void GetFontTableWithNoMem();
1.73 +
1.74 + void TestFbsFontHandleIsZeroForFont();
1.75 + void TestFbsFontHandleIsZeroForGlyph();
1.76 + void GlyphOutlineIteratorPanics();
1.77 + void SMPAndWDPSafeTest();
1.78 +
1.79 + void OutlinePanics(TInt (*aThreadFun)(TAny*));
1.80 + void OutlineLengthPanics(TInt (*aThreadFun)(TAny*));
1.81 +
1.82 +private:
1.83 + CFbsBitmap* iBmp;
1.84 + CFbsBitmap* iBmp2;
1.85 + CFbsBitmapDevice* iDevice;
1.86 + CFbsBitmapDevice* iDevice2;
1.87 + CFont* iFont;
1.88 + CFont* iFont2;
1.89 + CFontStore* iFontStore;
1.90 + TFontSpec iFontSpec, iFontSpec2;
1.91 + TUid iUid, iUid2;
1.92 + };
1.93 +
1.94 +
1.95 +
1.96 +#endif /* TFONTTABLEANDGLYPH_H_ */