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 344905 b623e256e1f4eb394f0f1d666e1c4a517e1f3e53
parent 344904 b5a2c80de72fc3b32c2ef44006e75c44917453d4
child 344906 ebb71fecdc3a42bfb94f74c0df54f42ae26d821d
push id31420
push userphilringnalda@gmail.com
push dateSat, 25 Feb 2017 18:35:21 +0000
treeherdermozilla-central@a08ec245fa24 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1342315
milestone54.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 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) {