Bug 1148330 - Remove Linux system generic fonts that collide with CSS generic fonts from preferences; r=mkmelin, a=rkent
authorJorg K <mozilla@jorgk.com>
Sun, 19 Apr 2015 06:47:00 +0200
changeset 25920 3bd15f5dd687f68e8ec3d15aebb71be3369fc2d0
parent 25919 080b64fa362d8a0f06aa1b38424b0aa02d7c7349
child 25921 30bd41ec59a326a6e816d2c5ba56996d3361b593
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, rkent
bugs1148330
Bug 1148330 - Remove Linux system generic fonts that collide with CSS generic fonts from preferences; r=mkmelin, a=rkent
mail/components/preferences/compose.js
--- a/mail/components/preferences/compose.js
+++ b/mail/components/preferences/compose.js
@@ -210,17 +210,19 @@ var gComposePane = {
     try
     {
       var enumerator = Components.classes["@mozilla.org/gfx/fontenumerator;1"]
                                  .getService(Components.interfaces.nsIFontEnumerator);
       var localFontCount = { value: 0 }
       var localFonts = enumerator.EnumerateAllFonts(localFontCount);
       for (var i = 0; i < localFonts.length; ++i)
       {
-        if (localFonts[i] != "")
+        // Remove Linux system generic fonts that collide with CSS generic fonts.
+        if (localFonts[i] != "" && localFonts[i] != "serif" &&
+            localFonts[i] != "sans-serif" && localFonts[i] != "monospace")
           fontsList.appendItem(localFonts[i], localFonts[i]);
       }
     }
     catch(e) { }
     // Choose the item after the list is completely generated.
     var preference = document.getElementById(fontsList.getAttribute("preference"));
     fontsList.value = preference.value;
    },