• Home
  • Raw
  • Download

Lines Matching +full:- +full:graphite2

30 #include "hb-shaper-impl.hh"
34 /* Compile wasm-micro-runtime with:
36 * $ cmake -DWAMR_BUILD_MULTI_MODULE=1 -DWAMR_BUILD_REF_TYPES=1 -DWAMR_BUILD_FAST_JIT=1
42 * - Add -DWAMR_BUILD_MULTI_MODULE=1 to your cmake build for wasm-micro-runtime,
44 * - Remove the #define HB_WASM_NO_MODULES line below,
46 * - Install your shared module with name ending in .wasm in
49 * - Build your font's wasm code importing the shared modules with the desired
50 * name. This can be done eg.: __attribute__((import_module("graphite2")))
51 * before each symbol in the shared-module's headers.
53 * - Try shaping your font and hope for the best...
56 * requires support from the host that seems to be missing from wasm-micro-runtime?
59 #include "hb-wasm-api.hh"
60 #include "hb-wasm-api-list.hh"
73 strncat (path, module_name, sizeof (path) - sizeof (HB_WASM_MODULE_DIR) - 16); in _hb_wasm_module_reader()
130 * Also, wasm-micro-runtime uses a singleton instance. So if in _hb_wasm_init()
131 * another library or client uses it, all bets are off. :-( in _hb_wasm_init()
195 data->wasm_blob = wasm_blob; in _hb_wasm_shaper_face_data_create()
196 data->wasm_module = wasm_module; in _hb_wasm_shaper_face_data_create()
215 hb_wasm_shape_plan_t *plan = face_data->plan.get_acquire (); in acquire_shape_plan()
216 if (likely (plan && face_data->plan.cmpexch (plan, nullptr))) in acquire_shape_plan()
227 module_inst = plan->module_inst = wasm_runtime_instantiate (face_data->wasm_module, in acquire_shape_plan()
236 exec_env = plan->exec_env = wasm_runtime_create_exec_env (module_inst, in acquire_shape_plan()
269 plan->wasm_shape_planptr = results[0].of.i32; in acquire_shape_plan()
289 if (cache && face_data->plan.cmpexch (nullptr, plan)) in release_shape_plan()
292 auto *module_inst = plan->module_inst; in release_shape_plan()
293 auto *exec_env = plan->exec_env; in release_shape_plan()
297 if (plan->wasm_shape_planptr) in release_shape_plan()
306 arguments[0].of.i32 = plan->wasm_shape_planptr; in release_shape_plan()
327 if (data->plan.get_relaxed ()) in _hb_wasm_shaper_face_data_destroy()
328 release_shape_plan (data, data->plan); in _hb_wasm_shaper_face_data_destroy()
329 wasm_runtime_unload (data->wasm_module); in _hb_wasm_shaper_face_data_destroy()
330 hb_blob_destroy (data->wasm_blob); in _hb_wasm_shaper_face_data_destroy()
364 if (unlikely (buffer->in_error ())) in _hb_wasm_shape()
368 hb_face_t *face = font->face; in _hb_wasm_shape()
369 const hb_wasm_face_data_t *face_data = face->data.wasm; in _hb_wasm_shape()
383 DEBUG_MSG (WASM, face_data, "Acquiring shape-plan failed."); in _hb_wasm_shape()
387 auto *module_inst = plan->module_inst; in _hb_wasm_shape()
388 auto *exec_env = plan->exec_env; in _hb_wasm_shape()
410 arguments[0].of.i32 = plan->wasm_shape_planptr; in _hb_wasm_shape()
433 if (!buffer->ensure_unicode ()) in _hb_wasm_shape()
443 buffer->successful = true; in _hb_wasm_shape()
463 buffer->clear_glyph_flags (); in _hb_wasm_shape()
464 buffer->unsafe_to_break (); in _hb_wasm_shape()