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

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

Issue 2163983005: Roll HarfBuzz to 1.3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-common.cc ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/harfbuzz-ng/src/hb-coretext.cc
diff --git a/third_party/harfbuzz-ng/src/hb-coretext.cc b/third_party/harfbuzz-ng/src/hb-coretext.cc
index 90eb69df5f2a1f47b5701205764890e7f907dda2..f4d9716e9e3a6ed64d8265c3e1cd46c72d6ab485 100644
--- a/third_party/harfbuzz-ng/src/hb-coretext.cc
+++ b/third_party/harfbuzz-ng/src/hb-coretext.cc
@@ -155,34 +155,34 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
CFRelease (last_resort_font_desc);
if (new_ct_font)
{
- // The CTFontCreateCopyWithAttributes call fails to stay on the same font
- // when reconfiguring the cascade list and may switch to a different font
- // when there are fonts that go by the same name, since the descriptor is
- // just name and size.
-
- // Avoid reconfiguring the cascade lists if the new font is outside the
- // system locations that we cannot access from the sandboxed renderer
- // process in Blink. This can be detected by the new file URL location
- // that the newly found font points to.
- CFURLRef new_url = (CFURLRef)CTFontCopyAttribute(new_ct_font, kCTFontURLAttribute);
+ /* The CTFontCreateCopyWithAttributes call fails to stay on the same font
+ * when reconfiguring the cascade list and may switch to a different font
+ * when there are fonts that go by the same name, since the descriptor is
+ * just name and size.
+ *
+ * Avoid reconfiguring the cascade lists if the new font is outside the
+ * system locations that we cannot access from the sandboxed renderer
+ * process in Blink. This can be detected by the new file URL location
+ * that the newly found font points to. */
+ CFURLRef new_url = (CFURLRef) CTFontCopyAttribute (new_ct_font, kCTFontURLAttribute);
// Keep reconfigured font if URL cannot be retrieved (seems to be the case
// on Mac OS 10.12 Sierra), speculative fix for crbug.com/625606
- if (!original_url || !new_url || CFEqual(original_url, new_url)) {
+ if (!original_url || !new_url || CFEqual (original_url, new_url)) {
CFRelease (ct_font);
ct_font = new_ct_font;
} else {
- CFRelease(new_ct_font);
+ CFRelease (new_ct_font);
DEBUG_MSG (CORETEXT, ct_font, "Discarding reconfigured CTFont, location changed.");
}
if (new_url)
- CFRelease(new_url);
+ CFRelease (new_url);
}
else
DEBUG_MSG (CORETEXT, ct_font, "Font copy with empty cascade list failed");
}
if (original_url)
- CFRelease(original_url);
+ CFRelease (original_url);
return ct_font;
}
« no previous file with comments | « third_party/harfbuzz-ng/src/hb-common.cc ('k') | third_party/harfbuzz-ng/src/hb-font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698