Bug 1342315 - Don't inadvertently ignore font feature settings when creating a new CTFont. r=jrmuizel
authorJonathan Kew <jkew@mozilla.com>
Fri, 24 Feb 2017 23:05:42 +0000
changeset 373932 b623e256e1f4eb394f0f1d666e1c4a517e1f3e53
parent 373931 b5a2c80de72fc3b32c2ef44006e75c44917453d4
child 373933 ebb71fecdc3a42bfb94f74c0df54f42ae26d821d
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1342315
milestone54.0a1
Bug 1342315 - Don't inadvertently ignore font feature settings when creating a new CTFont. r=jrmuizel
gfx/thebes/gfxMacFont.cpp
--- a/gfx/thebes/gfxMacFont.cpp
+++ b/gfx/thebes/gfxMacFont.cpp
@@ -558,17 +558,18 @@ gfxMacFont::CreateCTFontFromCGFontWithVa
         CTFontDescriptorRef varDesc = aFontDesc
             ? ::CTFontDescriptorCreateCopyWithAttributes(aFontDesc, varAttr)
             : ::CTFontDescriptorCreateWithAttributes(varAttr);
         ::CFRelease(varAttr);
 
         ctFont = ::CTFontCreateWithGraphicsFont(aCGFont, aSize, nullptr, varDesc);
         ::CFRelease(varDesc);
     } else {
-        ctFont = ::CTFontCreateWithGraphicsFont(aCGFont, aSize, nullptr, nullptr);
+        ctFont = ::CTFontCreateWithGraphicsFont(aCGFont, aSize, nullptr,
+                                                aFontDesc);
     }
     return ctFont;
 }
 
 int32_t
 gfxMacFont::GetGlyphWidth(DrawTarget& aDrawTarget, uint16_t aGID)
 {
     if (!mCTFont) {