Add a flag to hb_buffer_t to prevent the insertion of dotted circles on incorrect character sequences.
Current behavior unchanged if this flag is not set (and it isn't by default).
diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc
index 4475ceb..0bc2309 100644
--- a/src/hb-ot-shape-complex-khmer.cc
+++ b/src/hb-ot-shape-complex-khmer.cc
@@ -365,6 +365,9 @@
hb_font_t *font,
hb_buffer_t *buffer)
{
+ if (unlikely (buffer->flags & HB_BUFFER_FLAG_DO_NOT_INSERT_DOTTED_CIRCLE))
+ return;
+
/* Note: This loop is extra overhead, but should not be measurable. */
bool has_broken_syllables = false;
unsigned int count = buffer->len;