src/hb-buffer.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit da70111ab234e8b740ce6fb1789a1809fbec0c44 Author: Behdad Esfahbod <[email protected]> Date: Wed Oct 31 13:45:30 2012 -0700 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 diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 1eb513c..06b5c05 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -841,7 +841,14 @@ hb_buffer_add_utf (hb_buffer_t *buffer, 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 */ buffer->clear_context (0); _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
