fontservices/fontstore/inc/OPENFONT.H
changeset 46 6124ff6478cc
parent 21 f2f7b3284356
child 53 11e2bb0d14ba
equal deleted inserted replaced
45:662fa7de7023 46:6124ff6478cc
     1 /*
     1 /*
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    37 
    37 
    38 class CFont;
    38 class CFont;
    39 class COpenFontFile;
    39 class COpenFontFile;
    40 class COpenFontGlyph;
    40 class COpenFontGlyph;
    41 class COpenFontGlyphCache;
    41 class COpenFontGlyphCache;
    42 class COpenFontGlyphTreeEntry;
       
    43 class COpenFontPositioner;
    42 class COpenFontPositioner;
    44 class COpenFontSessionCache;
    43 class COpenFontSessionCache;
    45 class COpenFontSessionCacheList;
    44 class COpenFontSessionCacheList;
    46 class RFs;
    45 class RFs;
    47 class TCharacterMetrics;
    46 class TCharacterMetrics;
   249 	TAny* iReserved;						// unused; for future expansion
   248 	TAny* iReserved;						// unused; for future expansion
   250 	TUint8 iBitmapBuffer[1];				// buffer used to write the bitmap when it is first rasterized; this
   249 	TUint8 iBitmapBuffer[1];				// buffer used to write the bitmap when it is first rasterized; this
   251 											// is actually of size iBitmapBufferSize.
   250 											// is actually of size iBitmapBufferSize.
   252 	};
   251 	};
   253 
   252 
   254 class COpenFontGlyph;
       
   255 /**
   253 /**
   256 Open Font System font abstract base class.
   254 Open Font System font abstract base class.
   257 
   255 
   258 Derive a class from this class to represent an instance of a typeface at a 
   256 Derive a class from this class to represent an instance of a typeface at a 
   259 particular size, provide bitmaps of the glyphs, and determine whether 
   257 particular size, provide bitmaps of the glyphs, and determine whether 
   339 	inline TInt FontMaxHeight() const;
   337 	inline TInt FontMaxHeight() const;
   340 	void DeleteShaper() const;
   338 	void DeleteShaper() const;
   341 	TInt GetFontTable(TUint32 aTag, TAny*& aTableContent, TInt& aLength);
   339 	TInt GetFontTable(TUint32 aTag, TAny*& aTableContent, TInt& aLength);
   342 	TInt GetGlyphOutline(TUint aCode, TBool aHinted, TAny*& aOutline, TInt& aLength);
   340 	TInt GetGlyphOutline(TUint aCode, TBool aHinted, TAny*& aOutline, TInt& aLength);
   343 	
   341 	
   344 protected:	
       
   345 	/** WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   346 	*/
       
   347 	TInt PointerToThisOffset(const TAny* aAny);
       
   348 	/** WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   349 	*/
       
   350 	TAny* ThisOffsetToPointer(const TInt aOffset);
       
   351 		
       
   352 protected:
   342 protected:
   353 	RHeap* iHeap;
   343 	RHeap* iHeap;
   354 	TOpenFontMetrics iMetrics;
   344 	TOpenFontMetrics iMetrics;
   355 private:
   345 private:
   356 	/** The shaper for performing complex character positioning and
   346 	/** The shaper for performing complex character positioning and
   378 	/** The recommended baseline to baseline gap for successive
   368 	/** The recommended baseline to baseline gap for successive
   379 		lines of text in the font */
   369 		lines of text in the font */
   380 	TInt iFontLineGap;
   370 	TInt iFontLineGap;
   381 private:
   371 private:
   382 	const COpenFontGlyph* Glyph(TInt aSessionHandle,TInt aCode) const;
   372 	const COpenFontGlyph* Glyph(TInt aSessionHandle,TInt aCode) const;
   383 protected:
   373 
   384 
       
   385 	/** WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
       
   386 	*/
       
   387 	const COpenFontGlyph* FontCacheGlyph(TInt aCode,TInt*& aNode);
       
   388 	const COpenFontGlyph* FontCacheGlyph(TInt aCode);
   374 	const COpenFontGlyph* FontCacheGlyph(TInt aCode);
   389 	
   375 	
   390 	void SetGlyphCache(COpenFontGlyphCache* aGlyphCache);
   376 	void SetGlyphCache(COpenFontGlyphCache* aGlyphCache);
   391 	
   377 	
   392 private:
       
   393 	const COpenFontGlyph* SessionCacheGlyph(RHeap* aHeap,TInt aSessionHandle,TInt aCode,
   378 	const COpenFontGlyph* SessionCacheGlyph(RHeap* aHeap,TInt aSessionHandle,TInt aCode,
   394 											COpenFontSessionCache*& aCache,TInt& aIndex,TBool aCreate) const;
   379 											COpenFontSessionCache*& aCache,TInt& aIndex,TBool aCreate) const;
   395 	void RasterizeHelperL(TInt aCode,TOpenFontGlyphData* aGlyphData,TOpenFontGlyphData*& aTempGlyphData);
   380 	void RasterizeHelperL(TInt aCode,TOpenFontGlyphData* aGlyphData,TOpenFontGlyphData*& aTempGlyphData);
   396 
   381 
   397 	COpenFontSessionCacheList* SessionCacheList()const;
   382 	COpenFontSessionCacheList* SessionCacheList()const;
   404     // Offset from the address of the file used by this font.
   389     // Offset from the address of the file used by this font.
   405     // If the file has been deleted or cannot be used, the offest will be zero.
   390     // If the file has been deleted or cannot be used, the offest will be zero.
   406     TInt iFileOffset;
   391     TInt iFileOffset;
   407     
   392     
   408 	TInt iFaceIndex;										// index of the face in the font file
   393 	TInt iFaceIndex;										// index of the face in the font file
   409 protected:
   394 
   410     /**
   395 	// Offset from the address of this font of the per-font glyph cache which is owned by the font
   411     WARNING: Compatibility is not guaranteed in future releases. Please use the provided APIs only.
       
   412     Offset from the address of this font of the per-font glyph cache which is owned by the font
       
   413     @internalTechnology
       
   414     */  
       
   415     TInt iGlyphCacheOffset;
   396     TInt iGlyphCacheOffset;
   416 private:
   397 
   417     // Offset from the address of this font of the list of per-session glyph
   398     // Offset from the address of this font of the list of per-session glyph
   418     // caches which are owned by CFontStore
   399     // caches which are owned by CFontStore
   419     TInt iSessionCacheListOffset;
   400     TInt iSessionCacheListOffset;
   420 
   401 
   421 	TAny* iReserved; // unused; for future expansion
   402 	TAny* iReserved; // unused; for future expansion