if (mUnderlinedOrStrikeOut) { if (IsWin95OrWin98()) {   SIZE size; ::GetTextExtentPoint32W(aDC, aString, aLength, &size); size.cx -= mOverhangCorrection; RECT clipRect; clipRect.top = aY - size.cy; clipRect.bottom = aY + size.cy;  clipRect.left = aX; clipRect.right = aX + size.cx; NS_ExtTextOutW(aDC, this, aX, aY, ETO_CLIPPED, &clipRect, aString, aLength, NULL); return; } }   NS_ExtTextOutW(aDC, this, aX, aY, 0, NULL, aString, aLength, NULL);
nsAutoCharBuffer buffer; Convert(aString, aLength, buffer, &aLength); if (aLength) { NS_ExtTextOutA(aDC, this, aX, aY, 0, NULL, buffer.get(), aLength, NULL); }
nsFontWinUnicode::DrawString(HDC aDC, PRInt32 aX, PRInt32 aY,  const PRUnichar* aString, PRUint32 aLength){  // Due to a bug in WIN95 unicode rendering of truetype fonts  // with underline or strikeout, we need to set a clip rect  // to prevent the underline and/or strikethru from being rendered  // too far to the right of the character string.  // The WIN95 bug causes the underline to be 20-30% longer than  // it should be. @see bugzilla bug 8322                             // Do check for underline or strikeout first since they are rarely  // used. HTML text frames draw the underlines or strikeout rather  // than relying on loading and underline or strikeout font so very  // few fonts should have mUnderlinedOrStrikeOut set.  if (mUnderlinedOrStrikeOut) {    if (IsWin95OrWin98()) {      // Clip out the extra underline/strikethru caused by the      // bug in WIN95.      SIZE size;      ::GetTextExtentPoint32W(aDC, aString, aLength, &size);      size.cx -= mOverhangCorrection;      RECT clipRect;      clipRect.top = aY - size.cy;      clipRect.bottom = aY + size.cy; // Make it plenty large to allow for character descent.                                      // Not necessary to clip vertically, only horizontally      clipRect.left = aX;      clipRect.right = aX + size.cx;      NS_ExtTextOutW(aDC, this, aX, aY, ETO_CLIPPED, &clipRect, aString, aLength, NULL);       return;    }  }   // Do normal non-WIN95 text output without clipping  NS_ExtTextOutW(aDC, this, aX, aY, 0, NULL, aString, aLength, NULL);  }