Update contrib.
2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "TGraphicsContext.h"
22 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
23 #include <graphics/gdi/gdiconsts.h>
24 #include <graphics/gdi/gdistructs.h>
27 _LIT(KTestFontName, "Non Functional Test Font");
30 // Utility functions to show contents of test data using test.Printf
32 extern void PrintTestData (const TDesC& aTitle , const TDesC16& aDataBuffer);
34 extern void PrintTestData(const TDesC& aTitle, const TText16* aDataBuffer, const TInt aSize);
41 CLineArray::CLineArray() : iArrayIsEnabled(ETrue), iArray(0)
46 void CLineArray::Null()
48 if (iNext == this && iArray)
59 CLineArray::~CLineArray()
64 void CLineArray::ConstructL(TInt aGranularity)
67 iArray = new (ELeave) RArray<TTestGCDisplayLine>(aGranularity);
70 void CLineArray::Copy(const CLineArray& aOther)
77 iArray = aOther.iArray;
78 iArrayIsEnabled = aOther.iArrayIsEnabled;
81 void CLineArray::ResetLineArray()
86 const TTestGCDisplayLine& CLineArray::Line(TInt aIndex)
88 return (*iArray)[aIndex];
91 const TTestGCDisplayLine* CLineArray::Find(const TDesC& aText)
93 TInt count = LinesPresent();
94 for (TInt i = 0; i != count; ++i)
96 const TTestGCDisplayLine& line = Line(i);
97 if (line.iLineData.Find(aText) != KErrNotFound)
103 void CLineArray::AddLineL(TTestGCDisplayLine& aLine)
106 User::LeaveIfError(iArray->Append(aLine));
109 TInt CLineArray::LinesPresent()
111 return iArray->Count();
116 // CTestGraphicsDevice
119 CTestGraphicsDevice* CTestGraphicsDevice::NewL(TSize aSizeInPixels, RWsSession* aWsSession)
121 CTestGraphicsDevice* r = aWsSession?
122 new (ELeave) CTestGraphicsDevice(aSizeInPixels, aWsSession)
123 : new (ELeave) CTestGraphicsDevice(aSizeInPixels);
124 r->iLineArray.ConstructL(4);
125 if (aWsSession && KErrNone != r->Construct())
133 CTestGraphicsDevice::CTestGraphicsDevice(TSize aSizeInPixels, RWsSession* aWsSession)
134 : CWsScreenDevice(*aWsSession)
139 CTestGraphicsDevice::CTestGraphicsDevice(TSize aSizeInPixels)
144 void CTestGraphicsDevice::Set(TSize aSizeInPixels)
146 iSize = aSizeInPixels;
147 iHorizontalTwipsToPixels = 40;
148 iVerticalTwipsToPixels = 40;
149 iPalette.SetEntry(0, KRgbBlack);
150 iPalette.SetEntry(1, KRgbWhite);
151 iPalette.SetEntry(2, KRgbMagenta);
152 iPalette.SetEntry(3, KRgbCyan);
155 void CTestGraphicsDevice::SetHorizontalTwipsToPixels(TInt aTwipsToPixels)
157 iHorizontalTwipsToPixels = aTwipsToPixels;
160 void CTestGraphicsDevice::SetVerticalTwipsToPixels(TInt aTwipsToPixels)
162 iVerticalTwipsToPixels = aTwipsToPixels;
165 TDisplayMode CTestGraphicsDevice::DisplayMode() const
170 TSize CTestGraphicsDevice::SizeInPixels() const
175 TSize CTestGraphicsDevice::SizeInTwips() const
177 return TSize(iSize.iWidth * iHorizontalTwipsToPixels,
178 iSize.iHeight * iVerticalTwipsToPixels);
181 TInt CTestGraphicsDevice::CreateContext(CWindowGc*& aGC)
183 CTestGraphicsContext* r = new CTestGraphicsContext(this);
186 // only contruct if it is a fully-fledged Window Server thing
193 TInt CTestGraphicsDevice::CreateContext(CGraphicsContext*& aGC)
196 TInt r = CreateContext(p);
201 TInt CTestGraphicsDevice::NumTypefaces() const
206 void CTestGraphicsDevice::TypefaceSupport(TTypefaceSupport& aTypefaceSupport, TInt aTypefaceIndex) const
208 // The only font we have at the moment is 10 pixels * 12 pixels for every character
209 __ASSERT_ALWAYS(aTypefaceIndex == 0,
210 CTestGraphicsContext::Panic(CTestGraphicsContext::ETypefaceIndexOutOfRange));
211 aTypefaceSupport.iIsScalable = EFalse;
212 aTypefaceSupport.iMaxHeightInTwips = iVerticalTwipsToPixels * 12;
213 aTypefaceSupport.iMinHeightInTwips = iVerticalTwipsToPixels * 10;
214 aTypefaceSupport.iNumHeights = 1;
215 aTypefaceSupport.iTypeface.iName = KTestFontName;
216 aTypefaceSupport.iTypeface.SetIsProportional(ETrue); // a bit of a lie
217 aTypefaceSupport.iTypeface.SetIsSerif(EFalse);
218 aTypefaceSupport.iTypeface.SetIsSymbol(EFalse);
221 TInt CTestGraphicsDevice::FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const
223 // The only font we have at the moment is 10 pixels * 12 pixels for every character
224 __ASSERT_ALWAYS(aTypefaceIndex == 0,
225 CTestGraphicsContext::Panic(CTestGraphicsContext::ETypefaceIndexOutOfRange));
226 return iVerticalTwipsToPixels * FontHeightInPixels(aTypefaceIndex, aHeightIndex);
229 void CTestGraphicsDevice::PaletteAttributes(TBool& aModifiable, TInt& aNumEntries) const
235 void CTestGraphicsDevice::SetPalette(CPalette* aPalette)
237 for (TInt i = 0; i != CTestPalette::KNumEntries; ++i)
239 TRgb col = aPalette->GetEntry(i);
240 iPalette.SetEntry(i, col);
244 TInt CTestGraphicsDevice::GetPalette(CPalette*& aPalette) const
246 aPalette = const_cast<CTestPalette*>(&iPalette);
250 void CTestGraphicsDevice::GetPixel(TRgb& aColor, const TPoint&) const
255 void CTestGraphicsDevice::GetScanLine(TDes8&, const TPoint&, TInt, TDisplayMode) const
257 __ASSERT_DEBUG(0, CTestGraphicsContext::Panic(CTestGraphicsContext::EUnimplemented));
260 TInt CTestGraphicsDevice::AddFile(const TDesC&, TInt&)
262 return KErrNotSupported;
265 void CTestGraphicsDevice::RemoveFile(TInt)
269 TInt CTestGraphicsDevice::GetNearestFontInPixels(CFont*& aFont, const TFontSpec&)
271 CTestFont* font = new CTestFont();
278 TInt CTestGraphicsDevice::FontHeightInPixels(TInt, TInt) const
283 TInt CTestGraphicsDevice::HorizontalTwipsToPixels(TInt aTwips) const
285 return aTwips / iHorizontalTwipsToPixels;
288 TInt CTestGraphicsDevice::VerticalTwipsToPixels(TInt aTwips) const
290 return aTwips / iVerticalTwipsToPixels;
293 TInt CTestGraphicsDevice::HorizontalPixelsToTwips(TInt aPixels) const
295 return aPixels * iHorizontalTwipsToPixels;
298 TInt CTestGraphicsDevice::VerticalPixelsToTwips(TInt aPixels) const
300 return aPixels * iVerticalTwipsToPixels;
303 TInt CTestGraphicsDevice::GetNearestFontInTwips(CFont*& aFont, const TFontSpec& aFontSpec)
305 TFontSpec fontSpec = aFontSpec;
306 fontSpec.iHeight = VerticalTwipsToPixels(fontSpec.iHeight);
307 return GetNearestFontInPixels(aFont, fontSpec);
310 void CTestGraphicsDevice::ReleaseFont(CFont* aFont)
312 __ASSERT_ALWAYS(aFont->TypeUid() == TUid::Uid(12345),
313 CTestGraphicsContext::Panic(CTestGraphicsContext::EUnknownFont));
314 delete static_cast<CTestFont*>(aFont);
317 void CTestGraphicsDevice::AddRectToDrawnArea(const TRect& aRect, TBool aCondition)
319 // check if the drawing is on testing area
320 if (!(iTestingArea.IsEmpty()) && // if testing area has been set
321 !iHasDrawnOnTestingArea) // and nothing hasn't been drawn on it so far
322 iHasDrawnOnTestingArea = iTestingArea.Intersects(aRect);
324 if (iDrawnArea.IsEmpty())
327 iDrawnArea.BoundingRect(aRect);
328 // only one condition at the moment
331 if (iAreaDrawnWithCondition.IsEmpty())
332 iAreaDrawnWithCondition = aRect;
334 iAreaDrawnWithCondition.BoundingRect(aRect);
338 void CTestGraphicsDevice::SetTestingArea(TRect& aTestingArea)
340 iTestingArea = aTestingArea;
343 void CTestGraphicsDevice::AddTestingArea(TRect& moreTestingArea)
345 if (iTestingArea.IsEmpty())
346 iTestingArea = moreTestingArea;
348 iTestingArea.BoundingRect(moreTestingArea);
353 // CTestGraphicsContext
356 void CTestGraphicsContext::Panic(TInt aReason)
358 User::Panic(_L("CTestGC"), aReason);
361 CTestGraphicsContext::CTestGraphicsContext(CTestGraphicsDevice* aGd)
362 : CWindowGc(aGd), iGd(aGd), iDrawMode(EDrawModePEN), iPenSize(1,1)
364 iLineArray.Copy(aGd->LineArray());
367 TInt CTestGraphicsContext::Construct()
369 return CWindowGc::Construct();
372 void CTestGraphicsContext::AddRectToDrawnArea(const TRect& aRect)
374 TRect drawnRect = aRect;
375 drawnRect.Grow(iPenSize);
376 iGd->AddRectToDrawnArea(drawnRect,
377 iDrawMode == EDrawModeXOR || iDrawMode == EDrawModeNOTSCREEN);
380 void CTestGraphicsContext::AddPointToDrawnArea(const TPoint& aPoint)
382 AddRectToDrawnArea(TRect(aPoint, iPenSize));
385 CGraphicsDevice* CTestGraphicsContext::Device() const
390 void CTestGraphicsContext::SetOrigin(const TPoint& aPos)
395 void CTestGraphicsContext::SetDrawMode(TDrawMode aDrawingMode)
397 iDrawMode = aDrawingMode;
400 void CTestGraphicsContext::SetClippingRect(const TRect& /*aRect*/)
404 void CTestGraphicsContext::CancelClippingRect()
408 TInt CTestGraphicsContext::SetClippingRegion(const TRegion& /*aRegion*/)
413 void CTestGraphicsContext::CancelClippingRegion()
417 void CTestGraphicsContext::Reset()
419 iDrawMode = EDrawModePEN;
422 iPenSize.iHeight = 1;
425 void CTestGraphicsContext::UseFont(const CFont* aFont)
430 void CTestGraphicsContext::DiscardFont()
435 void CTestGraphicsContext::SetUnderlineStyle(TFontUnderline /*UnderlineStyle*/)
439 void CTestGraphicsContext::SetStrikethroughStyle(TFontStrikethrough /*aStrikethroughStyle*/)
443 void CTestGraphicsContext::SetWordJustification(TInt /*aExcessWidth*/,TInt /*aNumGaps*/)
447 void CTestGraphicsContext::SetCharJustification(TInt /*aExcessWidth*/,TInt /*aNumChars*/)
451 void CTestGraphicsContext::SetPenColor(const TRgb& aColor)
454 iGd->GetPalette(palette);
455 iPenColorIndex = palette->NearestIndex(aColor);
458 void CTestGraphicsContext::SetPenStyle(TPenStyle /*aPenStyle*/)
462 void CTestGraphicsContext::SetPenSize(const TSize& aSize)
467 void CTestGraphicsContext::SetBrushColor(const TRgb& /*aColor*/)
471 void CTestGraphicsContext::SetBrushStyle(TBrushStyle /*aBrushStyle*/)
475 void CTestGraphicsContext::SetBrushOrigin(const TPoint& /*aOrigin*/)
479 void CTestGraphicsContext::UseBrushPattern(const CFbsBitmap* /*aBitmap*/)
483 void CTestGraphicsContext::DiscardBrushPattern()
487 void CTestGraphicsContext::MoveTo(const TPoint& aPoint)
489 iCurrentPos = iOrigin + aPoint;
492 void CTestGraphicsContext::MoveBy(const TPoint& aVector)
494 iCurrentPos += aVector;
497 void CTestGraphicsContext::Plot(const TPoint& aPoint)
499 iCurrentPos = iOrigin + aPoint;
500 AddPointToDrawnArea(iCurrentPos);
503 void CTestGraphicsContext::DrawArc(const TRect& aRect,const TPoint& /*aStart*/,const TPoint& aEnd)
507 AddRectToDrawnArea(r);
508 iCurrentPos = iOrigin + aEnd;
511 void CTestGraphicsContext::DrawLine(const TPoint& aPoint1,const TPoint& aPoint2)
513 AddPointToDrawnArea(iOrigin + aPoint1);
514 iCurrentPos = iOrigin + aPoint2;
515 AddPointToDrawnArea(iCurrentPos);
518 void CTestGraphicsContext::DrawLineTo(const TPoint& aPoint)
520 AddPointToDrawnArea(iCurrentPos);
521 iCurrentPos = iOrigin + aPoint;
522 AddPointToDrawnArea(iCurrentPos);
525 void CTestGraphicsContext::DrawLineBy(const TPoint& aVector)
527 AddPointToDrawnArea(iCurrentPos);
528 iCurrentPos += aVector;
529 AddPointToDrawnArea(iCurrentPos);
532 void CTestGraphicsContext::DrawPolyLine(const CArrayFix<TPoint>* aPointList)
534 TInt num = aPointList->Count();
537 iCurrentPos = iOrigin + (*aPointList)[num - 1];
538 AddPointToDrawnArea(iCurrentPos);
542 void CTestGraphicsContext::DrawPolyLine(const TPoint* aPointList,TInt aNumPoints)
546 iCurrentPos = iOrigin + aPointList[aNumPoints - 1];
547 AddPointToDrawnArea(iCurrentPos);
551 void CTestGraphicsContext::DrawPie(const TRect& aRect,
552 const TPoint& /*aStart*/, const TPoint& aEnd)
556 AddRectToDrawnArea(r);
557 iCurrentPos = iOrigin + aEnd;
560 void CTestGraphicsContext::DrawEllipse(const TRect& aRect)
564 AddRectToDrawnArea(r);
567 void CTestGraphicsContext::DrawRect(const TRect& aRect)
571 AddRectToDrawnArea(r);
574 void CTestGraphicsContext::DrawRoundRect(const TRect& aRect,const TSize& aCornerSize)
579 AddRectToDrawnArea(r);
582 TInt CTestGraphicsContext::DrawPolygon(const CArrayFix<TPoint>* aPointList,TFillRule /*aFillRule*/)
584 TInt num = aPointList->Count();
587 iCurrentPos = iOrigin + (*aPointList)[num - 1];
588 AddPointToDrawnArea(iCurrentPos);
593 TInt CTestGraphicsContext::DrawPolygon(const TPoint* aPointList,TInt aNumPoints,TFillRule /*aFillRule*/)
597 iCurrentPos = iOrigin + aPointList[aNumPoints - 1];
598 AddPointToDrawnArea(iCurrentPos);
603 void CTestGraphicsContext::DrawBitmap(const TPoint& /*aTopLeft*/,const CFbsBitmap* /*aSource*/)
607 void CTestGraphicsContext::DrawBitmap(const TRect& /*aDestRect*/,const CFbsBitmap* /*aSource*/)
611 void CTestGraphicsContext::DrawBitmap(const TRect& /*aDestRect*/,const CFbsBitmap* /*aSource*/,const TRect& /*aSourceRect*/)
615 void CTestGraphicsContext::DrawText(const TDesC& aText, const TPoint& aPosition)
617 #ifdef PRINT_DRAWTEXT_LINES
619 _LIT(KDrawTextTitle, "Text being drawn");
620 PrintTestData(KDrawTextTitle, aText);
622 #endif /* PRINT_DRAWTEXT_LINES */
624 TTestGCDisplayLine thisLine;
625 thisLine.Set(aPosition, aText);
626 iLineArray.AddLineL(thisLine);
629 void CTestGraphicsContext::DrawText(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,
630 TTextAlign /*aAlignment*/, TInt aLeftMargin)
632 TPoint pos(aBox.iBr.iX + aLeftMargin, aBox.iTl.iY + aBaselineOffset);
634 DrawText(aText, pos);
637 void CTestGraphicsContext::DrawText(const TDesC& aText,TTextParameters* aParam, const TPoint& aPosition)
639 #ifdef PRINT_DRAWTEXT_LINES
641 _LIT(KDrawTextTitle, "Text being drawn");
642 PrintTestData(KDrawTextTitle, aText);
644 #endif /* PRINT_DRAWTEXT_LINES */
646 //Avoid crash by ASSERT in BitGdi DrawText function
647 __ASSERT_ALWAYS(aParam->iStart < aParam->iEnd,
648 CTestGraphicsContext::Panic(CTestGraphicsContext::EErrorParameter));
650 TTestGCDisplayLine thisLine;
651 TPtrC actualText = aText.Mid(aParam->iStart,aParam->iEnd - aParam->iStart + 1);
652 thisLine.Set(aPosition, actualText);
653 iLineArray.AddLineL(thisLine);
656 void CTestGraphicsContext::DrawText(const TDesC& aText,TTextParameters* aParam,const TRect& aBox,TInt aBaselineOffset,
657 TTextAlign /*aAlignment*/, TInt aLeftMargin)
659 TPoint pos(aBox.iBr.iX + aLeftMargin, aBox.iTl.iY + aBaselineOffset);
661 DrawText(aText,aParam, pos);
664 TInt CTestGraphicsContext::APIExtension(TUid aUid, TAny*& aOutput, TAny* aInput)
666 if (aUid == KDrawTextInContextUid)
668 TDrawTextInContextInternal* contextParam = (TDrawTextInContextInternal*)aInput;
669 DrawText(contextParam->iText, &contextParam->iParam, contextParam->iPosition);
672 else if (aUid == KDrawBoxTextInContextUid)
674 TDrawTextInContextInternal* contextParam = (TDrawTextInContextInternal*)aInput;
675 DrawText(contextParam->iText,&contextParam->iParam,contextParam->iBox,contextParam->iBaselineOffset,contextParam->iAlign,contextParam->iMargin);
678 // Future cases may be placed here later
680 return CWindowGc::APIExtension(aUid, aOutput, aInput);
684 void CTestGraphicsContext::Clear()
688 void CTestGraphicsContext::Clear(const TRect& /*aRect*/)
692 void CTestGraphicsContext::CopyRect(const TPoint& /*aOffset*/, const TRect& /*aRect*/)
696 void CTestGraphicsContext::BitBlt(const TPoint& /*aPoint*/, const CFbsBitmap* /*aBitmap*/)
700 void CTestGraphicsContext::BitBlt(const TPoint& /*aPoint*/, const CFbsBitmap* /*aBitmap*/,
701 const TRect& /*aRect*/)
705 void CTestGraphicsContext::BitBltMasked(const TPoint& /*aPoint*/, const CFbsBitmap* /*aBitmap*/,
706 const TRect& /*aSourceRect*/, const CFbsBitmap* /*aMaskBitmap*/, TBool /*aInvertMask*/)
710 void CTestGraphicsContext::SetFaded(TBool)
714 void CTestGraphicsContext::SetFadingParameters(TUint8,TUint8)
723 inline TBool IsSurrogate(TText a) { return 0xD800 == (a & 0xF800); }
724 inline TBool IsHighSurrogate(TText a) { return 0xD800 == (a & 0xFC00); }
725 inline TBool IsLowSurrogate(TText a) { return 0xDC00 == (a & 0xFC00); }
726 inline TChar PairSurrogates(TText aHigh, TText aLow)
728 return ((aHigh - 0xd7f7) << 10) + aLow;
731 TUid CTestFont::DoTypeUid() const
733 return TUid::Uid(12345);
736 TInt CTestFont::DoHeightInPixels() const
741 TInt CTestFont::DoAscentInPixels() const
752 static const TSpecialSizes KSpecialSizes[] =
754 { CTestFont::KThreePerEmSpace, 3 },
755 { CTestFont::KThinSpace, 2 },
756 { CTestFont::KHairSpace, 1 },
757 { CTestFont::KZeroWidthSpace, 0 },
758 { CTestFont::KZeroWidthNoBreakSpace, 0 },
761 TInt CTestFont::DoCharWidthInPixels(TChar aChar) const
764 // non-characters 0x??FFFE and 0x??FFFF
765 if ((cn & 0xFFFE) == 0xFFFE)
768 // Find character in the special sizes table
770 TInt last = sizeof(KSpecialSizes)/sizeof(KSpecialSizes[0]);
771 while (first != last)
773 TInt c = static_cast<TInt>(aChar);
774 TInt mid = (first + last) >> 1;
775 if (c < KSpecialSizes[mid].iCharacter)
777 else if (KSpecialSizes[mid].iCharacter < c)
780 return KSpecialSizes[mid].iWidth;
786 TInt CTestFont::DoTextCount(const TDesC& aText, TInt aWidthInPixels,
787 TInt& aExcessWidthInPixels) const
789 const TText* p = &aText[0];
790 const TText* pEnd = p + aText.Length();
792 TInt prevSurrogate = 0;
793 TInt charactersThatFit = 0;
800 if (IsHighSurrogate(*p))
802 else if (prevSurrogate != 0)
804 c = PairSurrogates(static_cast<TText>(prevSurrogate), *p);
810 total += CharWidthInPixels(c);
811 if (total <= aWidthInPixels)
815 aExcessWidthInPixels = total - aWidthInPixels;
816 return charactersThatFit;
819 TInt CTestFont::DoTextWidthInPixels(const TDesC& aText) const
822 TextCount(aText, 0, excess);
826 TInt CTestFont::DoBaselineOffsetInPixels() const
831 TInt CTestFont::DoTextCount(const TDesC& aText,TInt aWidthInPixels) const
834 return TextCount(aText, aWidthInPixels, excess);
837 TInt CTestFont::DoMaxCharWidthInPixels() const
842 TInt CTestFont::DoMaxNormalCharWidthInPixels() const
847 TFontSpec CTestFont::DoFontSpecInTwips() const
849 return TFontSpec(KTestFontName, 12);
852 CFont::TCharacterDataAvailability
853 CTestFont::DoGetCharacterData(TUint aCode, TOpenFontCharMetrics& aMetrics,
854 const TUint8*& aBitmap, TSize& aBitmapSize) const
860 // ESC character should cause this fault; no character data available.
861 return CFont::ENoCharacterData;
863 // We want 'W' to have side-bearings
864 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
865 width = aMetrics.Width();
866 aMetrics.SetHorizBearingX(-1);
867 aMetrics.SetWidth(width + 2);
868 return CFont::ECharacterWidthOnly ;
870 // We want / to have a left side-bearing
871 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
872 width = aMetrics.Width();
873 aMetrics.SetHorizBearingX(-1);
874 aMetrics.SetWidth(width + 1);
875 return CFont::ECharacterWidthOnly ;
877 // We want 'D' to have a left side-bearing only
878 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
879 aMetrics.SetHorizBearingX(-1);
880 return CFont::ECharacterWidthOnly ;
882 // We want Hebrew Tav to have a +ve left side-bearing
883 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
884 aMetrics.SetHorizBearingX(1);
885 return CFont::ECharacterWidthOnly ;
886 case KFullWidthSolidus:
887 // We want fw/ to have a right side-bearing
888 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
889 width = aMetrics.Width();
890 aMetrics.SetWidth(width + 1);
891 return CFont::ECharacterWidthOnly ;
893 // Arabic Waw-- has massive left side-bearing
894 CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);
895 width = aMetrics.Width();
896 aMetrics.SetHorizBearingX(-5);
897 aMetrics.SetWidth(width + 5);
898 return CFont::ECharacterWidthOnly ;
900 return CFont::DoGetCharacterData(aCode, aMetrics, aBitmap, aBitmapSize);