Lines Matching +full:- +full:graphite2
21 … function, it should represent a set of glyph IDs and their positions. (User-supplied WASM code wi…
26 | - | - | - |
34 | - | - | - |
36 | uint32 | mask | Unused in WASM; can be user-defined |
46 | - | - | - |
55 To communicate user-selected OpenType features to the user-defined WASM shaper, the host shaping en…
58 | - | - | - |
59 | uint32 | tag | Byte-encoded feature tag |
62 … input string representing end of the active region for this feature selection (-1=end of string) |
66 …ions; WASM authors may prefer to use higher-level abstractions around these functions, such as the…
68 ### Sub-shaping
147 Returns the byte-encoded OpenType script tag of the buffer.
293 …ted circumstances, such as when instantiating a second variable font and sub-shaping a buffer usin…
325 Returns the units-per-em of the font face.
369 …the variants `debugprint1` ... `debugprint4` suffix the message with a comma-separated list of the…
373 …-micro-runtime` library installed on your computer. Download `wasm-micro-runtime` from [its GitHub…
378 $ cmake -B build -DWAMR_BUILD_REF_TYPES=1 -DWAMR_BUILD_FAST_JIT=1
379 $ cmake --build build --parallel
380 $ sudo cmake --build build --target install
383 (If you don't want to install `wasm-micro-runtime` globally, you can copy `libiwasm.*` and `libvmli…
385 Once `wasm-micro-runtime` is installed, to enable the WASM shaper, you need to add the string `-Dwa…
388 $ meson setup build -Dwasm=enabled
391 Graphite2 : NO
394 $ meson compile -C build
399 …-level interface wrappers which makes the process easier. Here are the steps to create an example …
401 * First, install wasm-pack, which helps us to generate optimized WASM files. It writes some Javascr…
404 $ cargo install wasm-pack
410 $ cargo new --lib hello-wasm
417 crate-type = ["cdylib"]
419 wasm-bindgen = "0.2"
420 harfbuzz-wasm = { path = "your-harfbuzz-source/src/wasm/rust/harfbuzz-wasm"}
430 pub fn shape(_shape_plan:u32, font_ref: u32, buf_ref: u32, _features: u32, _num_features: u32) -> i…
435 …ve functions on the font and buffer objects. More on native functions later - let's get this shape…
437 * To compile the shaper, run `wasm-pack build --target nodejs`:
442 Compiling hello-wasm v0.1.0 (...)
445 [INFO]: ⬇️ Installing wasm-bindgen...
446 [INFO]: Optimizing wasm binaries with `wasm-opt`...
458 % python3 ~/harfbuzz/src/addTable.py test.ttf test-wasm.ttf pkg/hello_wasm_bg.wasm
464 % hb-shape test-wasm.ttf abc --shapers=wasm
468 (The `--shapers=wasm` isn't necessary, as any font with a `Wasm` table will be sent to the WASM sha…
470 Congratulations! Our shaper did nothing, but in Rust! Now let's do something - it's time for the He…
474 …andard output using the `debug` function. To make this easier, we've got the `harfbuzz-wasm` crate:
480 pub fn shape(_shape_plan:u32, _font_ref: u32, _buf_ref: u32, _features: u32, _num_features: u32) ->…
489 $ hb-shape test-wasm.ttf abc
494 …nd buffer, but we can turn those into useful Rust structures using the `harfbuzz-wasm` crate again:
501 pub fn shape(_shape_plan:u32, font_ref: u32, buf_ref: u32, _features: u32, _num_features: u32) -> i…
514 … all the time. It also takes care of marshalling the buffer back to Harfbuzz-land; when a GlyphBuf…
516 …ping for the majority of your shaping work, and then make changes to the pre-shaped buffer afterwa…
524 pub fn shape(_shape_plan:u32, font_ref: u32, buf_ref: u32, _features: u32, _num_features: u32) -> i…
536 item.x_offset = ((rng.rand_u32() as i32) >> 24) - 120;
537 item.y_offset = ((rng.rand_u32() as i32) >> 24) - 120;
544 See the documentation for the `harfbuzz-wasm` crate for all the other