[HarfBuzz] harfbuzz: Branch 'master'
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Sep 7 20:57:15 UTC 2016
src/hb-coretext.cc | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
New commits:
commit b717cd7be506217e466e32a456df9af4d2720c0c
Author: Dominik Röttsches <d-r at roettsches.de>
Date: Wed Sep 7 23:56:57 2016 +0300
Do reconfigure the cascade list for Emoji font on OS X 10.9.5 (#313)
This seems to fix crash issues on 10.9.5 reported on Chrome, compare
crbug.com/549610
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index 9e24e90..ee7f91c 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -149,9 +149,16 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
/* crbug.com/576941 and crbug.com/625902 and the investigation in the latter
* bug indicate that the cascade list reconfiguration occasionally causes
* crashes in CoreText on OS X 10.9, thus let's skip this step on older
- * operating system versions. */
- if (&CTGetCoreTextVersion != NULL && CTGetCoreTextVersion() <= kCTVersionNumber10_9)
- return ct_font;
+ * 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_10) {
+ CFStringRef fontName = CTFontCopyPostScriptName (ct_font);
+ bool isEmojiFont = CFStringCompare (fontName, CFSTR("AppleColorEmoji"), 0) == kCFCompareEqualTo;
+ CFRelease (fontName);
+ if (!isEmojiFont)
+ return ct_font;
+ }
CFURLRef original_url = (CFURLRef)CTFontCopyAttribute(ct_font, kCTFontURLAttribute);
More information about the HarfBuzz
mailing list