#include "hb-utf-private.hh"
-#ifndef HB_DEBUG_BUFFER
-#define HB_DEBUG_BUFFER (HB_DEBUG+0)
-#endif
-
/**
* SECTION: hb-buffer
* @title: Buffers
/**
* hb_buffer_diff:
*
+ * If dottedcircle_glyph is (hb_codepoint_t) -1 then %HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT
+ * and %HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT are never returned. This should be used by most
+ * callers if just comparing two buffers is needed.
*
* Since: 1.5.0
**/
return HB_BUFFER_DIFF_FLAG_CONTENT_TYPE_MISMATCH;
hb_buffer_diff_flags_t result = HB_BUFFER_DIFF_FLAG_EQUAL;
+ bool contains = dottedcircle_glyph != (hb_codepoint_t) -1;
unsigned int count = reference->len;
unsigned int i;
for (i = 0; i < count; i++)
{
- if (info[i].codepoint == dottedcircle_glyph)
+ if (contains && info[i].codepoint == dottedcircle_glyph)
result |= HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT;
- else if (info[i].codepoint == 0)
+ if (contains && info[i].codepoint == 0)
result |= HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT;
}
result |= HB_BUFFER_DIFF_FLAG_LENGTH_MISMATCH;
result |= HB_BUFFER_DIFF_FLAG_CLUSTER_MISMATCH;
if ((buf_info->mask & HB_GLYPH_FLAG_DEFINED) != (ref_info->mask & HB_GLYPH_FLAG_DEFINED))
result |= HB_BUFFER_DIFF_FLAG_GLYPH_FLAGS_MISMATCH;
- if (ref_info->codepoint == dottedcircle_glyph)
+ if (contains && ref_info->codepoint == dottedcircle_glyph)
result |= HB_BUFFER_DIFF_FLAG_DOTTED_CIRCLE_PRESENT;
- else if (ref_info->codepoint == 0)
+ if (contains && ref_info->codepoint == 0)
result |= HB_BUFFER_DIFF_FLAG_NOTDEF_PRESENT;
buf_info++;
ref_info++;
test "x$builddir" = x && builddir=.
test "x$top_builddir" = x && top_builddir=../..
-#hb_shape="$top_builddir/util/hb-shape$EXEEXT --verify"
-hb_shape="$top_builddir/util/hb-shape$EXEEXT"
+hb_shape="$top_builddir/util/hb-shape$EXEEXT --verify"
+#hb_shape="$top_builddir/util/hb-shape$EXEEXT"
fails=0
}
bool ret = true;
- hb_buffer_diff_flags_t diff = hb_buffer_diff (buffer, reconstruction, 0, 0);
+ hb_buffer_diff_flags_t diff = hb_buffer_diff (buffer, reconstruction, (hb_codepoint_t) -1, 0);
if (diff)
{
if (error)