os/textandloc/fontservices/fontstore/tfs/t_linkedfontscomparison.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: 
    15 *
    16 */
    17 
    18 
    19 #ifndef T_LINKEDFONTSCOMPARISON_H_
    20 #define T_LINKEDFONTSCOMPARISON_H_
    21 
    22 #include "TGraphicsHarness.h"
    23 #include "thashreferenceimages.h"
    24 
    25 class CTLinkedFontsComparisonStep : public CTGraphicsStep
    26 	{
    27 public:
    28 	CTLinkedFontsComparisonStep();
    29 protected:
    30 	// From CTGraphicsStep
    31 	virtual CTGraphicsBase* CreateTestL();
    32 	};
    33 
    34 _LIT(KTLinkedFontsComparisonStep, "TLinkedFontsComparison");
    35 
    36 class CTLinkedFontsComparison : public CTGraphicsBase
    37 	{
    38 public:
    39 	CTLinkedFontsComparison(CTestStep* aStep);
    40 	~CTLinkedFontsComparison();
    41 
    42 protected:
    43 	virtual void RunTestCaseL(TInt aCurTestCase);
    44 	virtual void ConstructL();
    45 private:
    46 	TBool CheckMonoTypeInstalledL();
    47 	void CreateBitmapDeviceL(TDisplayMode aMode);
    48 	void RegisterLinkedTypefacesL();
    49 	void TestDrawTextUsingLinkedFontsL();
    50 	void FreeScreenDevice();
    51 	void DoTestDrawingOutputL(const TDesC& aHashId, const TPtrC& aFont, const TDesC& aOutputString,
    52 							 TPoint aPosition, TInt size, TUint32 attributes);
    53 	void PrepareTestEnvironment(TFontSpec &aFontSpec, const TPtrC& aFont, TInt aSize, TUint32 aAttributes,
    54 							TBool aSetEffects = ETrue, TBool aSetColors = EFalse);
    55 	HBufC* GenerateTestDescriptionLC(TInt aSize,TUint32 aAttributes, const TPtrC &aTypefaceName, const TDesC &aTestDescription);
    56 
    57 private:
    58 	CFbsBitGc* iGc;
    59 	CFbsBitmapDevice* iBitmapDevice;
    60 	RFbsSession* iFbs;
    61 	CFbsBitmap* iBitmap;
    62 	CTestStep* iStep;
    63 	CTHashReferenceImages *iHashUtil;
    64 	};
    65 
    66 #endif /*T_LINKEDFONTS2_H_*/