mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-28 17:19:17 +01:00
[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:
1 parent
8e53c7c125
commit
6a9f576fd4
1 file changed
+3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user