summaryrefslogtreecommitdiffstats
path: root/gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc')
-rw-r--r--gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc b/gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc
new file mode 100644
index 0000000000..9081cfebcc
--- /dev/null
+++ b/gfx/harfbuzz/src/wasm/sample/c/shape-ot.cc
@@ -0,0 +1,18 @@
+#define HB_WASM_INTERFACE(ret_t, name) __attribute__((export_name(#name))) ret_t name
+
+#include <hb-wasm-api.h>
+
+extern "C" {
+void debugprint1 (const char *s, int32_t);
+void debugprint2 (const char *s, int32_t, int32_t);
+}
+
+bool_t
+shape (void *shape_plan,
+ font_t *font,
+ buffer_t *buffer,
+ const feature_t *features,
+ uint32_t num_features)
+{
+ return shape_with (font, buffer, features, num_features, "ot");
+}