fontservices/fontstore/src/FNTBODY.CPP
changeset 40 91ef7621b7fc
parent 21 f2f7b3284356
child 55 336bee5c2d35
equal deleted inserted replaced
21:f2f7b3284356 40:91ef7621b7fc
    18 
    18 
    19 #include <s32file.h>
    19 #include <s32file.h>
    20 #include <fntstore.h>
    20 #include <fntstore.h>
    21 #include "FNTBODY.H"
    21 #include "FNTBODY.H"
    22 #include <graphics/openfontconstants.h>
    22 #include <graphics/openfontconstants.h>
       
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "FNTBODYTraces.h"
       
    27 #endif
       
    28 
    23 
    29 
    24 CFontStoreFile::CFontStoreFile()
    30 CFontStoreFile::CFontStoreFile()
    25  :	iCollectionUid(KNullUid),
    31  :	iCollectionUid(KNullUid),
    26 	iUsageCount(1),
    32 	iUsageCount(1),
    27 	iFileStore(NULL),
    33 	iFileStore(NULL),
   270         }
   276         }
   271 	}
   277 	}
   272 
   278 
   273 const TBitmapFontCharacterMetrics* TCharacterMetricsTable::Metric(TInt aIndex) const
   279 const TBitmapFontCharacterMetrics* TCharacterMetricsTable::Metric(TInt aIndex) const
   274 	{
   280 	{
   275 	__ASSERT_DEBUG((aIndex >= 0) && (aIndex <= iNumberOfMetrics), Panic(EFntMetricsIndexOutOfBounds));
   281 	if ((aIndex < 0) || (aIndex > iNumberOfMetrics))
       
   282 	    {
       
   283 	    OstTraceExt2( TRACE_FATAL, TCHARACTERMETRICSTABLE_METRIC, "TCharacterMetricsTable::Metric, aIndex=%d, iNumberOfMetrics=%d, Panic(EFntMetricsIndexOutOfBounds)", aIndex, iNumberOfMetrics);
       
   284 	    __ASSERT_DEBUG(0, Panic(EFntMetricsIndexOutOfBounds));
       
   285 	    }
   276     // Sometimes the start ptr is to a metrics heap item and sometimes it points into a ROM file
   286     // Sometimes the start ptr is to a metrics heap item and sometimes it points into a ROM file
   277     if (iMetricsOnHeap)
   287     if (iMetricsOnHeap)
   278         {
   288         {
   279         // Start ptr is to metrics heap item
   289         // Start ptr is to metrics heap item
   280         return MetricsFromOffset(aIndex);
   290         return MetricsFromOffset(aIndex);