From 6a9f576fd438aef23242e72bd04285d0ea1279ad Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Feb 2021 11:31:32 -0700 Subject: [PATCH] [coretext] Silence CoreText deprecation warning As suggested by Ned, just ignoring it. warning: 'CTGetCoreTextVersion' is deprecated: first deprecated in macOS 11.0 - Use -[NSProcessInfo operatingSystemVersion] [-Wdeprecated-declarations] --- src/hb-coretext.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index a6dd1bcfb..efea46e6d 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -190,7 +190,10 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) * reconfiguring the cascade list causes CoreText crashes. For details, see * crbug.com/549610 */ // 0x00070000 stands for "kCTVersionNumber10_10", see CoreText.h +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" if (&CTGetCoreTextVersion != nullptr && CTGetCoreTextVersion() < 0x00070000) { +#pragma GCC diagnostic pop CFStringRef fontName = CTFontCopyPostScriptName (ct_font); bool isEmojiFont = CFStringCompare (fontName, CFSTR("AppleColorEmoji"), 0) == kCFCompareEqualTo; CFRelease (fontName);