[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]
This commit is contained in:
parent
8e53c7c125
commit
6a9f576fd4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue