/* Just in case */
#undef G_DISABLE_ASSERT
+#define HB_UNUSED G_GNUC_UNUSED
/* Misc */
} G_STMT_END
+static inline hb_face_t *
+hb_test_open_font_file (const char *font_path)
+{
+#if GLIB_CHECK_VERSION(2,37,2)
+ char *path = g_test_build_filename (G_TEST_DIST, font_path, NULL);
+#else
+ char *path = g_strdup (font_path);
+#endif
+
+ hb_blob_t *blob = hb_blob_create_from_file (path);
+ hb_face_t *face;
+ if (hb_blob_get_length (blob) == 0)
+ g_error ("Font %s not found.", path);
+
+ face = hb_face_create (blob, 0);
+ hb_blob_destroy (blob);
+
+ g_free (path);
+
+ return face;
+}
+
HB_END_DECLS
#endif /* HB_TEST_H */