fbs/fontandbitmapserver/tfbs/tfonttableandglyph.h
author Pat Downey <patd@symbian.org>
Thu, 24 Jun 2010 11:26:02 +0100
changeset 102 f4d9a5ce4604
parent 36 01a6848ebfd7
child 116 171fae344dd4
permissions -rw-r--r--
Re-merge fixes for bug 1362, bug 1666, bug 1863, KhronosRI and bld.inf.

// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef TFONTTABLEANDGLYPH_H_
#define TFONTTABLEANDGLYPH_H_

#include <gdi.h>
#include "TGraphicsHarness.h"

class CTFontAndGlyphStep : public CTGraphicsStep
    {
public:
    CTFontAndGlyphStep();
protected:  
    //from CTGraphicsStep
    virtual CTGraphicsBase* CreateTestL();
    };

_LIT(KTFontTableAndGlyphStep,"TFontTableAndGlyphOutline");



class CFbsTestForFont: public CFbsFont 
    {
public:
    CFbsTestForFont():CFbsFont() { }
    void Duplicate(TInt aFontHandle) {CFbsFont::Duplicate(aFontHandle);}    
    void SetHandle(TInt aHandle) { iHandle = aHandle; }
    TInt ClientHandle(){return iHandle;};
    ~CFbsTestForFont() { iHandle = 0; }
    };




class CTFontAndGlyph : public CTGraphicsBase
    {
    
public:
    CTFontAndGlyph(CTestStep* aStep);
    ~CTFontAndGlyph();

protected:
//from  CTGraphicsStep
    virtual void RunTestCaseL(TInt aCurTestCase);

private:
    void ConstructL();
    void CleanEnv();

    void GetHintedGlyphById();
    void GetUnHintedGlyphById();
    void GetHintedGlyphByWrongId();
    void GetGlyphWithNoMem();
    void GetFontTable();    
    void GetFontTableByWrongTag();
    void GetFontTableWithNoMem();
    
    void TestFbsFontHandleIsZeroForFont();          
    void TestFbsFontHandleIsZeroForGlyph();         
    void GlyphOutlineIteratorPanics();
    void SMPAndWDPSafeTest();
    
    void OutlinePanics(TInt (*aThreadFun)(TAny*));
    void OutlineLengthPanics(TInt (*aThreadFun)(TAny*));
       
private:
    CFbsBitmap*         iBmp;
    CFbsBitmap*         iBmp2;
    CFbsBitmapDevice*   iDevice;
    CFbsBitmapDevice*   iDevice2;
    CFont*       iFont;
    CFont*       iFont2;
    CFontStore*         iFontStore;
    TFontSpec           iFontSpec, iFontSpec2;
    TUid                iUid, iUid2;    
    };



#endif /* TFONTTABLEANDGLYPH_H_ */