[coretext] Use intended coretext version check logic (#315)

This commit is contained in:
Ebrahim Byagowi 2016-09-09 23:28:28 +04:30 committed by Behdad Esfahbod
parent 4867734528
commit fc4e671f31
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
* operating system versions. Except for the emoji font, where _not_
* reconfiguring the cascade list causes CoreText crashes. For details, see
* crbug.com/549610 */
if (&CTGetCoreTextVersion != NULL && CTGetCoreTextVersion() <= kCTVersionNumber10_9) {
// 0x00070000 stands for "kCTVersionNumber10_10", see CoreText.h
if (&CTGetCoreTextVersion != NULL && CTGetCoreTextVersion() < 0x00070000) {
CFStringRef fontName = CTFontCopyPostScriptName (ct_font);
bool isEmojiFont = CFStringCompare (fontName, CFSTR("AppleColorEmoji"), 0) == kCFCompareEqualTo;
CFRelease (fontName);