rem: if( currValue != dataObject.languageData[language].types[type] ) pref.SetUnicharPref( fontPrefString, dataObject.languageData[language].types[type] ); 
add:  var dataValue = dataObject.languageData[language].types[type]; if( currValue != dataValue ) { if (dataValue) { pref.SetUnicharPref( fontPrefString, dataValue ); } else {     try {  pref.ClearUserPref( fontPrefString ); } catch(e) { } } } 
context: function saveFontPrefs()  {    // if saveState function is available, assume can call it.    // why is this extra qualification required?!!!!    if( top.hPrefWindow.wsm.contentArea.saveState )      {        saveState();        parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-fonts.xul"] = GetFields();      }    // saving font prefs    var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://browser/content/pref/pref-fonts.xul"];    var pref = parent.hPrefWindow.pref;    for( var language in dataObject.languageData )      {        for( var type in dataObject.languageData[language].types )          {            var fontPrefString = "font.name." + type + "." + language;            var currValue = "";            try              {                currValue = pref.CopyUnicharPref( fontPrefString );              }            catch(e)              {              }            if( currValue != dataObject.languageData[language].types[type] )              pref.SetUnicharPref( fontPrefString, dataObject.languageData[language].types[type] );          }        var variableSizePref = "font.size.variable." + language;        var fixedSizePref = "font.size.fixed." + language;        var minSizePref = "font.minimum-size." + language;        var currVariableSize = 12, currFixedSize = 12, minSizeVal = 0;        try          {            currVariableSize = pref.GetIntPref( variableSizePref );            currFixedSize = pref.GetIntPref( fixedSizePref );            minSizeVal = pref.GetIntPref( minSizePref );          }        catch(e)          {          }        if( currVariableSize != dataObject.languageData[language].variableSize )          pref.SetIntPref( variableSizePref, dataObject.languageData[language].variableSize );        if( currFixedSize != dataObject.languageData[language].fixedSize )          pref.SetIntPref( fixedSizePref, dataObject.languageData[language].fixedSize );        if ( minSizeVal != dataObject.languageData[language].minSize ) {          pref.SetIntPref ( minSizePref, dataObject.languageData[language].minSize );        }      }    // font scaling    var fontDPI       = parseInt( dataObject.fontDPI );    var myFonts = dataObject.dataEls["useMyFonts"].checked;    var defaultFont   = dataObject.defaultFont;    var myColors = dataObject.dataEls["useMyColors"].checked;    try      {        var currDPI = pref.GetIntPref( "browser.display.screen_resolution" );        var currFonts = pref.GetIntPref( "browser.display.use_document_fonts" );        var currColors = pref.GetBoolPref("browser.display.use_document_colors");        var currDefault = pref.CopyUnicharPref( "font.default" );      }    catch(e)      {      }    if( currDPI != fontDPI )      pref.SetIntPref( "browser.display.screen_resolution", fontDPI );    if( currFonts == myFonts )      pref.SetIntPref( "browser.display.use_document_fonts", !myFonts );    if( currDefault != defaultFont )      {        pref.SetUnicharPref( "font.default", defaultFont );      }    if (currColors == myColors)      pref.SetBoolPref("browser.display.use_document_colors", !myColors);    var items = ["foregroundText", "background", "unvisitedLinks", "visitedLinks"];    var prefs = ["browser.display.foreground_color", "browser.display.background_color",                 "browser.anchor_color", "browser.visited_color"];    var prefvalue;    for (var i = 0; i < items.length; ++i) {      prefvalue = dataObject.dataEls[items[i]].value;      pref.SetUnicharPref(prefs[i], prefvalue)    }    items = ["browserUseSystemColors", "browserUnderlineAnchors"];    prefs = ["browser.display.use_system_colors", "browser.underline_anchors"];    for (var i = 0; i < items.length; ++i) {      prefvalue = dataObject.dataEls[items[i]].checked;      pref.SetBoolPref(prefs[i], prefvalue)    }  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/adf8fc19dc18a62d513eccc7d367aeb4501cc987/pref-fonts.js/clean/browser/components/prefwindow/content/pref-fonts.js