os/textandloc/fontservices/fontstore/tfs/FNTBODY_OLD.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 1996-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 __FNTBODY_OLD_H__
    20 #define __FNTBODY_OLD_H__
    21 
    22 #include <e32std.h>
    23 #include "FNTSTD.H"
    24 #include "FNTBODY.H"
    25 
    26 class TBitmapCodeSectionOld : public TCodeSection
    27 	{
    28 	public:			  
    29 	TBitmapCodeSectionOld(RHeap* aHeap);
    30 	void InternalizeL(RReadStream& aStream);
    31 	void RestoreComponentsL(const CStreamStore& aStreamStore);
    32 	void FixUpComponents(TInt aFileAddress);
    33 	void DeleteComponents();
    34 	void operator delete(TAny*);
    35 	void operator delete(TAny*,TAny*) {} // To prevent compiler warning
    36 	TBitmapFontCharacterOffset* CharacterOffsetsList() const;
    37 	TUint8* Bitmap() const;
    38 
    39 	private:
    40 	void InternalizeOffsetsL(RReadStream& aStream);
    41 	void InternalizeBitmapL(RReadStream& aStream);
    42 
    43 	RHeap* iHeap;
    44 	TStreamId iOffsetsId;
    45 	TInt iCharacterOffsetsListOffset;
    46 	TStreamId iBitmapId;
    47 	TInt iBitmapOffset;
    48 	};
    49 
    50 class CFontBitmapOld : public CBase
    51 	{
    52 public:
    53 	CFontBitmapOld(RHeap* aHeap,CFontStoreFile* aFontStoreFile);
    54 	void InternalizeL(RReadStream &aStream);
    55 	void UseL();
    56 	void Release();
    57 	TBitmapFontCharacterMetrics CharacterMetrics(TInt aCode,const TUint8*& aBytes) const;
    58 	void operator delete(TAny*);
    59 	void operator delete(TAny*,TAny*) {} // To prevent compiler warning
    60 	void SetPosture(TFontPosture aPosture);
    61 	TFontPosture Posture();
    62 	void SetStrokeWeight(TFontStrokeWeight aStrokeWeight);
    63 	TFontStrokeWeight StrokeWeight();
    64 	void SetIsProportional(TBool aIsProportional);
    65 	TBool IsProportional();
    66 	CFontStoreFile* FontStoreFile() const;
    67 protected:
    68 	~CFontBitmapOld();
    69 	void RestoreComponentsL();	 //  Has reference to FontStoreFile
    70 	void DeleteComponents();   
    71 	TBitmapCodeSectionOld* CodeSectionList() const;
    72 	TCharacterMetricsTable* MetricsTable() const;
    73 public:
    74 	RHeap* iHeap;
    75 	TInt iFontStoreFileOffset;
    76 	TUid iUid;
    77 protected:
    78 	TInt8 iPosture;
    79 	TInt8 iStrokeWeight;
    80 	TInt8 iIsProportional;
    81 	TBool iIsInRAM;
    82 	TInt iUsageCount;
    83 public:
    84 	TInt8 iCellHeightInPixels;
    85 	TInt8 iAscentInPixels;
    86 	TInt8 iMaxCharWidthInPixels;
    87 	TInt8 iMaxNormalCharWidthInPixels;
    88 	TInt iBitmapEncoding;
    89 	TInt iNumCodeSections;
    90 	TInt iCodeSectionListOffset;
    91 private:
    92 	TCharacterMetricsTable iCharacterMetricsTable;
    93 	};
    94 
    95 #endif // __FNTBODY_OLD_H__