Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: third_party/harfbuzz-ng/src/hb-coretext.cc

Issue 2609123003: Roll HarfBuzz to 1.3.4 (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/harfbuzz-ng/README.chromium ('k') | third_party/harfbuzz-ng/src/hb-font-private.hh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright © 2012,2013 Mozilla Foundation. 2 * Copyright © 2012,2013 Mozilla Foundation.
3 * Copyright © 2012,2013 Google, Inc. 3 * Copyright © 2012,2013 Google, Inc.
4 * 4 *
5 * This is part of HarfBuzz, a text shaping library. 5 * This is part of HarfBuzz, a text shaping library.
6 * 6 *
7 * Permission is hereby granted, without written agreement and without 7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this 8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the 9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in 10 * above copyright notice and the following two paragraphs appear in
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 DEBUG_MSG (CORETEXT, cg_font, "Font CTFontCreateWithGraphicsFont() failed"); 145 DEBUG_MSG (CORETEXT, cg_font, "Font CTFontCreateWithGraphicsFont() failed");
146 return NULL; 146 return NULL;
147 } 147 }
148 148
149 /* crbug.com/576941 and crbug.com/625902 and the investigation in the latter 149 /* crbug.com/576941 and crbug.com/625902 and the investigation in the latter
150 * bug indicate that the cascade list reconfiguration occasionally causes 150 * bug indicate that the cascade list reconfiguration occasionally causes
151 * crashes in CoreText on OS X 10.9, thus let's skip this step on older 151 * crashes in CoreText on OS X 10.9, thus let's skip this step on older
152 * operating system versions. Except for the emoji font, where _not_ 152 * operating system versions. Except for the emoji font, where _not_
153 * reconfiguring the cascade list causes CoreText crashes. For details, see 153 * reconfiguring the cascade list causes CoreText crashes. For details, see
154 * crbug.com/549610 */ 154 * crbug.com/549610 */
155 if (&CTGetCoreTextVersion != NULL && CTGetCoreTextVersion() < kCTVersionNumber 10_10) { 155 // 0x00070000 stands for "kCTVersionNumber10_10", see CoreText.h
156 if (&CTGetCoreTextVersion != NULL && CTGetCoreTextVersion() < 0x00070000) {
156 CFStringRef fontName = CTFontCopyPostScriptName (ct_font); 157 CFStringRef fontName = CTFontCopyPostScriptName (ct_font);
157 bool isEmojiFont = CFStringCompare (fontName, CFSTR("AppleColorEmoji"), 0) = = kCFCompareEqualTo; 158 bool isEmojiFont = CFStringCompare (fontName, CFSTR("AppleColorEmoji"), 0) = = kCFCompareEqualTo;
158 CFRelease (fontName); 159 CFRelease (fontName);
159 if (!isEmojiFont) 160 if (!isEmojiFont)
160 return ct_font; 161 return ct_font;
161 } 162 }
162 163
163 CFURLRef original_url = (CFURLRef)CTFontCopyAttribute(ct_font, kCTFontURLAttri bute); 164 CFURLRef original_url = (CFURLRef)CTFontCopyAttribute(ct_font, kCTFontURLAttri bute);
164 165
165 /* Create font copy with cascade list that has LastResort first; this speeds u p CoreText 166 /* Create font copy with cascade list that has LastResort first; this speeds u p CoreText
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 1297
1297 hb_bool_t 1298 hb_bool_t
1298 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan, 1299 _hb_coretext_aat_shape (hb_shape_plan_t *shape_plan,
1299 hb_font_t *font, 1300 hb_font_t *font,
1300 hb_buffer_t *buffer, 1301 hb_buffer_t *buffer,
1301 const hb_feature_t *features, 1302 const hb_feature_t *features,
1302 unsigned int num_features) 1303 unsigned int num_features)
1303 { 1304 {
1304 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features); 1305 return _hb_coretext_shape (shape_plan, font, buffer, features, num_features);
1305 } 1306 }
OLDNEW
« no previous file with comments | « third_party/harfbuzz-ng/README.chromium ('k') | third_party/harfbuzz-ng/src/hb-font-private.hh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698