Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please add a way to specify the --no-subset-tables option? #2

Open
Taikono-Himazin opened this issue Dec 3, 2022 · 0 comments

Comments

@Taikono-Himazin
Copy link

I've tried using this to subset the font.
However, an error related to FFTM occurred and conversion could not be performed.
I found that specifying --no-subset-tables works around this.
But this had no way of specifying it.
I got around it by changing the code and adding this line to create-subset.js.

module.exports = async function createSubset({
  fontFile,
  unicodeRange,
  flavor,
  outputFile,
}) {
  const flags = [
    flavor ? ` --flavor="${flavor}"` : '',
    unicodeRange ? ` --unicodes="${unicodeRange}"` : '',
    outputFile ? ` --output-file="${outputFile}"` : '',
    ` --no-subset-tables+="FFTM"`,   // add this line.
  ];

  const command = `pyftsubset ${fontFile}${flags.join('')}`;
  const { stderr } = await exec(command);
  const { size } = await fsStat(outputFile);

  if (stderr) {
    throw stderr;
  }

  // eslint-disable-next-line no-console
  console.log('+ ', `${outputFile} - ${fileSize(size)}`);
};

But I think there is a better way.
But I didn't know how. (I'm not familiar with node.js.)
So it's a suggestion. Could you please add a way to specify --no-subset-tables.
I wanted to make a pull request, but I couldn't write code that worked. sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant