char buf[1024];
if (!mFont) { LoadFont(); if (!mFont) return 0; }  XChar2b buf[512];
nsFontXlibUserDefined::GetWidth(const PRUnichar* aString, PRUint32 aLength){  char buf[1024];  char *p;  PRInt32 bufLen;  ENCODER_BUFFER_ALLOC_IF_NEEDED(p, gUserDefinedConverter,      aString, aLength, buf, sizeof(buf), bufLen);    PRUint32 len = Convert(aString, aLength, p, bufLen);  NS_ASSERTION(((mFont->min_byte1 == 0) && (mFont->max_byte1 == 0)) ||                GetXlibFontIs10646(), "using 8bit instead of 16bit text data");  int textWidth = XTextWidth(mFont, p, len);    ENCODER_BUFFER_FREE_IF_NEEDED(p, buf);  return textWidth;}