nsFontWinUnicode::DrawString(HDC aDC, PRInt32 aX, PRInt32 aY,
nsFontWinSubstitute::DrawString(HDC aDC, PRInt32 aX, PRInt32 aY,
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)  {     //XXX: This code to test the OS version     //was lifted out of nsRenderingContext     //It really should be moved to a common location that both     //the rendering context and nsFontMetricsWin can access.     // Determine if OS = WIN95    if (NOT_SETUP == gIsWIN95) {      OSVERSIONINFO os;      os.dwOSVersionInfoSize = sizeof(os);      ::GetVersionEx(&os);      // XXX This may need tweaking for win98      if (VER_PLATFORM_WIN32_NT == os.dwPlatformId) {        gIsWIN95 = PR_FALSE;      }      else {        gIsWIN95 = PR_TRUE;      }    }    if (gIsWIN95)    {        // Clip out the extra underline/strikethru caused by the        // bug in WIN95.      SIZE size;      ::GetTextExtentPoint32W(aDC, aString, aLength, &size);      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;      ::ExtTextOutW(aDC, aX, aY, ETO_CLIPPED, &clipRect, aString, aLength, NULL);       return;    }  }   // Do normal non-WIN95 text output without clipping  ::ExtTextOutW(aDC, aX, aY, 0, NULL, aString, aLength, NULL);  }