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 489626 b623e256e1f4eb394f0f1d666e1c4a517e1f3e53
parent 489625 b5a2c80de72fc3b32c2ef44006e75c44917453d4
child 489627 ebb71fecdc3a42bfb94f74c0df54f42ae26d821d
push id46871
push userbmo:sledru@mozilla.com
push dateSat, 25 Feb 2017 12:16:21 +0000
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) {