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

[coretext] Fix assert on Yosemite

Apparently those functions documented as sometimes returning NULL
actually exercise that right in OS X 10.10 Yosemite.  The scratch
was too small for that.  I *think* I fixed it, but haven't tested
as I don't have Yosemite.
上级 087733dd
......@@ -735,7 +735,11 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
if (num_glyphs == 0)
continue;
buffer->ensure (buffer->len + num_glyphs);
/* Needed buffer size in case we end up using scratch buffer. */
unsigned int alt_size = (sizeof (CGGlyph) + sizeof (CGPoint) + sizeof (CFIndex)) / sizeof (hb_glyph_info_t) + 2;
buffer->ensure (MAX (buffer->len + num_glyphs, alt_size));
if (buffer->in_error)
FAIL ("Buffer resize failed");
scratch = buffer->get_scratch_buffer (&scratch_size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册