nsFontXlibNormal::GetWidth(const PRUnichar* aString, PRUint32 aLength)
nsFontXlibUserDefined::GetWidth(const PRUnichar* aString, PRUint32 aLength)
nsFontXlibNormal::GetWidth(const PRUnichar* aString, PRUint32 aLength){  if (!mFont) {    LoadFont();    if (!mFont)      return 0;  }  XChar2b buf[512];  char *p;  PRInt32 bufLen;  int textWidth;  ENCODER_BUFFER_ALLOC_IF_NEEDED(p, mCharSetInfo->mConverter,      aString, aLength, buf, sizeof(buf), bufLen);  int len = mCharSetInfo->Convert(mCharSetInfo, (XFontStruct*) mFont, aString,                                  aLength, p, bufLen);  if ((mFont->min_byte1 == 0) && (mFont->max_byte1 == 0))    textWidth = XTextWidth(mFont, (char *) buf, len);  else    textWidth = XTextWidth16(mFont, buf, len / 2);  ENCODER_BUFFER_FREE_IF_NEEDED(p, buf);  return textWidth;}