Imported Upstream version 1.2.7
[platform/upstream/harfbuzz.git] / src / test.cc
index 22108b8..0c90f8f 100644 (file)
 #include "hb.h"
 
 #ifdef HAVE_GLIB
-#include <glib.h>
+# include <glib.h>
+# if !GLIB_CHECK_VERSION (2, 22, 0)
+#  define g_mapped_file_unref g_mapped_file_free
+# endif
 #endif
 #include <stdlib.h>
 #include <stdio.h>
@@ -100,6 +103,7 @@ main (int argc, char **argv)
   hb_buffer_t *buffer = hb_buffer_create ();
 
   hb_buffer_add_utf8 (buffer, "\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x95", -1, 0, -1);
+  hb_buffer_guess_segment_properties (buffer);
 
   hb_shape (font, buffer, NULL, 0);
 
@@ -116,7 +120,7 @@ main (int argc, char **argv)
            info->cluster,
            info->codepoint,
            pos->x_offset,
-           pos->x_offset,
+           pos->y_offset,
            pos->x_advance,
            pos->y_advance);