fontWin->DrawString(data->mDC, x, y, str, 1);
if (IS_HIGH_SURROGATE(*str) && ((str+1)<end) && IS_LOW_SURROGATE(*(str+1))) {  fontWin->DrawString(data->mDC, x, y, str, 2);  data->mX += *data->mSpacing++; ++str; } else { fontWin->DrawString(data->mDC, x, y, str, 1); }
do_DrawString(const nsFontSwitch* aFontSwitch,              const PRUnichar*    aSubstring,              PRUint32            aSubstringLength,              void*               aData){  nsFontWin* fontWin = aFontSwitch->mFontWin;  PRInt32 x, y;  DrawStringData* data = (DrawStringData*)aData;  if (data->mFont != fontWin->mFont) {    data->mFont = fontWin->mFont;    ::SelectObject(data->mDC, data->mFont);  }  data->mLength += aSubstringLength;  if (data->mSpacing) {    // XXX Fix path to use a twips transform in the DC and use the    // spacing values directly and let windows deal with the sub-pixel    // positioning.    // Slow, but accurate rendering    const PRUnichar* str = aSubstring;    const PRUnichar* end = aSubstring + aSubstringLength;    while (str < end) {      // XXX can shave some cycles by inlining a version of transform      // coord where y is constant and transformed once      x = data->mX;      y = data->mY;      data->mTranMatrix->TransformCoord(&x, &y);      fontWin->DrawString(data->mDC, x, y, str, 1);      data->mX += *data->mSpacing++;      ++str;    }  }  else {    fontWin->DrawString(data->mDC, data->mX, data->mY, aSubstring, aSubstringLength);    // be ready if there is more to come    if (data->mLength < data->mMaxLength) {      data->mX += fontWin->GetWidth(data->mDC, aSubstring, aSubstringLength);    }  }  return PR_TRUE; // don't stop till the end}