提交 fc9de44a 编写于 作者: B Behdad Esfahbod

Comments

上级 46809dee
......@@ -155,15 +155,15 @@ 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.
/* 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);
if (CFEqual(original_url, new_url)) {
CFRelease (ct_font);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册