[wasm] Add to harfbuzz.cc and hb-features
This commit is contained in:
parent
aa8f9eed63
commit
c5af08c0dc
|
@ -273,16 +273,17 @@ DISTCLEANFILES += \
|
|||
hb-features.h: hb-features.h.in $(top_builddir)/config.status
|
||||
$(AM_V_GEN) $(SED) \
|
||||
-e 's/mesondefine HB_HAS_CAIRO/$(HB_HAS_CAIRO_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_FREETYPE/$(HB_HAS_FREETYPE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GDI/$(HB_HAS_GDI_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GLIB/$(HB_HAS_GLIB_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GOBJECT/$(HB_HAS_GOBJECT_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_DIRECTWRITE/$(HB_HAS_DIRECTWRITE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_CORETEXT/$(HB_HAS_CORETEXT_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_GRAPHITE/$(HB_HAS_GRAPHITE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_ICU/$(HB_HAS_ICU_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_UNISCRIBE/$(HB_HAS_UNISCRIBE_DEF)/' \
|
||||
-e 's/mesondefine HB_HAS_WASM/$(HB_HAS_WASM_DEF)/' \
|
||||
"$<" > "$@" || ($(RM) "$@"; false)
|
||||
|
||||
|
||||
|
|
|
@ -58,3 +58,5 @@
|
|||
#include "hb-ucd.cc"
|
||||
#include "hb-unicode.cc"
|
||||
#include "hb-uniscribe.cc"
|
||||
#include "hb-wasm-api.cc"
|
||||
#include "hb-wasm-shape.cc"
|
||||
|
|
|
@ -106,6 +106,13 @@ HB_BEGIN_DECLS
|
|||
*/
|
||||
#mesondefine HB_HAS_UNISCRIBE
|
||||
|
||||
/**
|
||||
* HB_HAS_WASM:
|
||||
*
|
||||
* Defined if Harfbuzz has been built with WebAssembly support.
|
||||
*/
|
||||
#mesondefine HB_HAS_WASM
|
||||
|
||||
|
||||
HB_END_DECLS
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*/
|
||||
|
||||
#include "hb.hh"
|
||||
|
||||
#ifdef HAVE_WASM
|
||||
|
||||
#include "hb-wasm-api.hh"
|
||||
|
||||
#define module_inst wasm_runtime_get_module_inst (exec_env)
|
||||
|
@ -38,3 +42,5 @@
|
|||
#undef module_inst
|
||||
|
||||
hb_user_data_key_t _hb_wasm_ref_type_key = {};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -429,7 +429,7 @@ custom_target('harfbuzz.cc',
|
|||
output: 'harfbuzz.cc',
|
||||
input: hb_base_sources + hb_glib_sources + hb_ft_sources +
|
||||
hb_graphite2_sources + hb_uniscribe_sources + hb_gdi_sources +
|
||||
hb_directwrite_sources + hb_coretext_sources,
|
||||
hb_directwrite_sources + hb_coretext_sources + hb_wasm_sources,
|
||||
command: [find_program('gen-harfbuzzcc.py'),
|
||||
'@OUTPUT@', meson.current_source_dir(), '@INPUT@'],
|
||||
)
|
||||
|
@ -515,6 +515,7 @@ features = [
|
|||
'GRAPHITE',
|
||||
'ICU',
|
||||
'UNISCRIBE',
|
||||
'WASM',
|
||||
]
|
||||
|
||||
hb_enabled_features = configuration_data()
|
||||
|
|
Loading…
Reference in New Issue