harfbuzzjs
harfbuzzjs copied to clipboard
Add an example of keeping the specified layout-features
--layout-features=list of string table tags or *
I used the .wasm directly. Create the set which will contain user inputs , and put features which you want in the set. @yisibl
const ptr = exports.hb_subset_input_create_or_fail();
const layoutFeatures = exports.hb_subset_input_set(
ptr,
6 /** HB_SUBSET_SETS_LAYOUT_FEATURE_TAG **/
);
exports.hb_set_add(layoutFeatures,hb_tag('smcp')); // hb_tag function is in the source code of hb.js
https://github.com/harfbuzz/harfbuzzjs/blob/28ae985d871d436e2b0ef2be61157a05d7d19b5c/hbjs.js#L14-L21