prefStr.AppendWithConversion(langGroup);
prefStr.Append(fontLang);
nsresult GetMailNewsFont(MimeObject *obj, PRBool styleFixed,  PRInt32 *fontPixelSize, 		                     PRInt32 *fontSizePercentage, nsCString& fontLang){  nsresult rv = NS_OK;  nsIPref *prefs = GetPrefServiceManager(obj->options);  if (prefs) {    MimeInlineText  *text = (MimeInlineText *) obj;    nsCAutoString charset;    // get a charset    if (!text->initializeCharset)      ((MimeInlineTextClass*)&mimeInlineTextClass)->initialize_charset(obj);    if (!text->charset || !(*text->charset))      charset.Assign("us-ascii");    else      charset.Assign(text->charset);    nsCOMPtr<nsICharsetConverterManager2> charSetConverterManager2;    nsCOMPtr <nsIAtom> charsetAtom;    nsCOMPtr<nsIAtom> langGroupAtom;    const PRUnichar* langGroup = nsnull;    nsCAutoString prefStr;    ToLowerCase(charset);    charSetConverterManager2 = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);    if ( NS_FAILED(rv))      return rv;    // get a language, e.g. x-western, ja    rv = charSetConverterManager2->GetCharsetAtom2(charset.get(),getter_AddRefs(charsetAtom));    if (NS_FAILED(rv))      return rv;    rv = charSetConverterManager2->GetCharsetLangGroup(charsetAtom,getter_AddRefs(langGroupAtom));    if (NS_FAILED(rv))      return rv;    rv = langGroupAtom->GetUnicode(&langGroup);    if (NS_FAILED(rv))      return rv;    fontLang.AssignWithConversion(langGroup);    // get a font size from pref    prefStr.Assign(!styleFixed ? "font.size.variable." : "font.size.fixed.");    prefStr.AppendWithConversion(langGroup);    rv = prefs->GetIntPref(prefStr.get(), fontPixelSize);    if (NS_FAILED(rv))      return rv;    // get original font size    PRInt32 originalSize;    rv = prefs->GetDefaultIntPref(prefStr.get(), &originalSize);    if (NS_FAILED(rv))      return rv;    // calculate percentage    *fontSizePercentage = originalSize ?                           (PRInt32)((float)*fontPixelSize / (float)originalSize * 100) : 0;  }  return NS_OK;}