os/textandloc/fontservices/fontstore/tfs/T_FontMetrics.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2005-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 /**
    20  @file
    21  @test
    22  @internalComponent Internal Symbian test code
    23 */
    24 
    25 #ifndef __T_FONTMETRICS_H__
    26 #define __T_FONTMETRICS_H__
    27 
    28 #include <fntstore.h>
    29 #include "TGraphicsHarness.h"
    30 
    31 _LIT(KTFontMetricsStep, "TFontMetrics");
    32 
    33 class CTFontMetricsStep : public CTGraphicsStep
    34 	{
    35 public:
    36 	CTFontMetricsStep();
    37 protected:	
    38 	// from CTGraphicsStep
    39 	virtual CTGraphicsBase* CreateTestL();
    40 	};
    41 
    42 class CTFontMetrics : public CTGraphicsBase
    43 	{
    44 public:
    45 	CTFontMetrics(CTestStep* aStep);
    46 	~CTFontMetrics();
    47 protected:
    48 	// from CTGraphicsBase
    49 	virtual void RunTestCaseL(TInt aCurTestCase);
    50 	virtual void ConstructL(void);
    51 private:
    52 	void InstallRasterizerL(void);
    53 	void AddFileL(void);
    54 	TOpenFontSpec GetTOpenFontSpec(void);
    55 	void TLanguage2GlyphSample(void);
    56 	void GetNearestFontToDesignHeightInPixels(void);
    57 	void Verify_GetNearestFontToDesignHeightInPixels(const CFont& aFont, TInt aScript);
    58 	void GetNearestFontToMaxHeightInPixels(void);
    59 	void Verify_GetNearestFontToMaxHeightInPixels(const CFont& aFont, TInt aScript);
    60 	void VerifyTypefaceNameAndID(const CFont& aFont);
    61 	void FontAccessInCTypefaceStore(void);
    62 	void TestINC086513();
    63 	void TestPDEF099034();
    64 	void TestGetNearestFontToMaxHeightInPixels();
    65 private:
    66 	static const TInt KRequiredHeight;
    67 private:
    68 	CFontStore*	iFontStore;
    69 	RHeap*		iHeap;
    70 	};
    71 
    72 #endif // __T_FONTMETRICS_H__