Skip to content

Commit

Permalink
Update harfbuzzjs version and remove manual layout subset enable
Browse files Browse the repository at this point in the history
  • Loading branch information
ebraminio committed May 3, 2021
1 parent 780e1f8 commit fce181b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ const { readFile } = require('fs').promises;
const _ = require('lodash');
const fontverter = require('fontverter');

function HB_TAG(chunkName) {
return chunkName.split('').reduce(function (a, ch) {
return (a << 8) + ch.charCodeAt(0);
}, 0);
}

const loadAndInitializeHarfbuzz = _.once(async () => {
const {
instance: { exports },
Expand Down Expand Up @@ -52,12 +46,6 @@ async function subsetFont(
exports.hb_set_add(inputUnicodes, c.codePointAt(0));
}

// Enable GSUB/GPOS/GDEF subset, remove once it is enabled by upstream
const dropTables = exports.hb_subset_input_drop_tables_set(input);
exports.hb_set_del(dropTables, HB_TAG('GSUB'));
exports.hb_set_del(dropTables, HB_TAG('GPOS'));
exports.hb_set_del(dropTables, HB_TAG('GDEF'));

const subset = exports.hb_subset(face, input);

// Clean up
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"dependencies": {
"fontverter": "^2.0.0",
"harfbuzzjs": "^0.1.4",
"harfbuzzjs": "^0.1.5",
"p-limit": "^3.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit fce181b

Please sign in to comment.