char strBuf[1024]; PRUint32 len = mCharSetInfo->Convert(mCharSetInfo,mFontMetrics,aString, aLength,strBuf,sizeof(strBuf));
QChar *buf = new QChar[aLength + 1];
nsFontQTNormal::GetWidth(const PRUnichar *aString,PRUint32 aLength){  int result = 0;  if (mFontMetrics) {    char strBuf[1024];    PRUint32 len = mCharSetInfo->Convert(mCharSetInfo,mFontMetrics,aString,                                         aLength,strBuf,sizeof(strBuf));    QChar *buf = new QChar[len];    for (PRUint32 i = 0; i < len; i++)      buf[i] = QChar(strBuf[i]);     result = mFontMetrics->width(QString(buf,len));    delete [] buf;  }  return result;}