Bug 1464904 - When font-variations support is preffed off, do not set up variation ranges in the gfxFontEntry for a system font, so that font selection will rely only on the static properties of the faces. r=lsalzman, a=RyanVM
authorJonathan Kew <jkew@mozilla.com>
Tue, 29 May 2018 20:24:28 +0100
changeset 473529 8735fe57245edec03c7a99b82626e57f9a4997bd
parent 473528 7aa58e74173962f26e61191567091afc35202abf
child 473530 c3359bea833fb3ac6ec2ff9fe1426ca1f5f1e8f1
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman, RyanVM
bugs1464904
milestone61.0
Bug 1464904 - When font-variations support is preffed off, do not set up variation ranges in the gfxFontEntry for a system font, so that font selection will rely only on the static properties of the faces. r=lsalzman, a=RyanVM
gfx/thebes/gfxFontEntry.cpp
--- a/gfx/thebes/gfxFontEntry.cpp
+++ b/gfx/thebes/gfxFontEntry.cpp
@@ -1011,16 +1011,17 @@ gfxFontEntry::GetColorLayersInfo(uint32_
                                              aLayerGlyphs,
                                              aLayerColors);
 }
 
 void
 gfxFontEntry::SetupVariationRanges()
 {
     if (!gfxPlatform::GetPlatform()->HasVariationFontSupport() ||
+        !StaticPrefs::layout_css_font_variations_enabled() ||
         !HasVariations() || IsUserFont()) {
         return;
     }
     AutoTArray<gfxFontVariationAxis,4> axes;
     GetVariationAxes(axes);
     for (const auto& axis : axes) {
         switch (axis.mTag) {
         case HB_TAG('w','g','h','t'):