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

Don't clear buffer pre-context if no new context is being provided

Patch from Jonathan Kew.

Part of fixing:

Mozilla Bug 801410 - avoid inserting dotted-circle for run-initial
Unicode combining characters in "simple" scripts such as Latin

https://bugzilla.mozilla.org/show_bug.cgi?id=801410
上级 0bc7a384
...@@ -841,7 +841,14 @@ hb_buffer_add_utf (hb_buffer_t *buffer, ...@@ -841,7 +841,14 @@ hb_buffer_add_utf (hb_buffer_t *buffer,
buffer->ensure (buffer->len + item_length * sizeof (T) / 4); buffer->ensure (buffer->len + item_length * sizeof (T) / 4);
if (!buffer->len) /* If buffer is empty and pre-context provided, install it.
* This check is written this way, to make sure people can
* provide pre-context in one add_utf() call, then provide
* text in a follow-up call. See:
*
* https://bugzilla.mozilla.org/show_bug.cgi?id=801410#c13
*/
if (!buffer->len && item_offset > 0)
{ {
/* Add pre-context */ /* Add pre-context */
buffer->clear_context (0); buffer->clear_context (0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册