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
authorJonathan Kew <jkew@mozilla.com>
Tue, 29 May 2018 20:24:28 +0100
changeset 420357 315a0483bab2cc51be304b36508ad4860bfffe38
parent 420356 b400e931ba822978163c57bf58917713e1fa755d
child 420358 a9e4ed628027c9f4937bfbd4281d14f1f353fc1c
push id34071
push userncsoregi@mozilla.com
push dateWed, 30 May 2018 09:25:30 +0000
treeherdermozilla-central@5866d6685849 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslsalzman
bugs1464904
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
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'):