prefs->SetCharPref("font.default", "serif");
prefs->SetCharPref("font.default.x-western", "serif");
TranslatePropFont(unsigned char *aRegValue, DWORD aRegValueLength,                  DWORD aRegValueType,                  nsIPrefBranch *prefs, char *aPrefKeyName) {  HDC     dc = ::GetDC(0);  LOGFONT lf;  int     isSerif = 1;  // serif or sans-serif font?  lf.lfCharSet = DEFAULT_CHARSET;  lf.lfPitchAndFamily = 0;  PL_strncpyz(lf.lfFaceName, NS_REINTERPRET_CAST(char *, aRegValue),              LF_FACESIZE);  ::EnumFontFamiliesEx(dc, &lf, fontEnumProc, (LPARAM) &isSerif, 0);  ::ReleaseDC(0, dc);  if (isSerif) {    prefs->SetCharPref("font.name.serif.x-western",                       NS_REINTERPRET_CAST(char *, aRegValue));    prefs->SetCharPref("font.default", "serif");  } else {    prefs->SetCharPref("font.name.sans-serif.x-western",                       NS_REINTERPRET_CAST(char *, aRegValue));    prefs->SetCharPref("font.default", "sans-serif");  }}