webengine/osswebengine/WebCore/platform/symbian/FontCacheSymbian.cpp
branchRCL_3
changeset 35 1f3c3f2f5b0a
parent 26 cb62a4f66ebe
child 36 c711bdda59f4
equal deleted inserted replaced
34:220a17280356 35:1f3c3f2f5b0a
     1 /*
     1     /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006 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 the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
   212     TInt twipSize = iScreenDevice->VerticalPixelsToTwips(fSize);
   212     TInt twipSize = iScreenDevice->VerticalPixelsToTwips(fSize);
   213 
   213 
   214     // convert to platform-supported font family
   214     // convert to platform-supported font family
   215     TPtrC fPtr( SystemFontFamily( fontDescription.family().family() ) );
   215     TPtrC fPtr( SystemFontFamily( fontDescription.family().family() ) );
   216     
   216     
   217 
   217     //Locate the left most font if the fptr string contains more than one font family names comma seperated
       
   218     TInt comma = fPtr.Locate(TChar(','));
       
   219     if (comma != KErrNotFound) {
       
   220         fPtr.Set(fPtr.Left(comma));
       
   221     }
       
   222      
   218     TFontSpec fontSpec(fPtr, twipSize);
   223     TFontSpec fontSpec(fPtr, twipSize);
   219     fontSpec.iFontStyle.SetStrokeWeight(fontDescription.bold() ? EStrokeWeightBold : EStrokeWeightNormal);
   224     fontSpec.iFontStyle.SetStrokeWeight(fontDescription.bold() ? EStrokeWeightBold : EStrokeWeightNormal);
   220     fontSpec.iFontStyle.SetPosture(fontDescription.italic() ? EPostureItalic : EPostureUpright);
   225     fontSpec.iFontStyle.SetPosture(fontDescription.italic() ? EPostureItalic : EPostureUpright);
   221     fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap); // enable anti-aliasing
   226     fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap); // enable anti-aliasing
   222     
   227