We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am attempting to subset a font and finding that the resulting characters are completely mangled.
The font I am subsetting is Noto Sans CJK SC Bold from https://www.google.com/get/noto/help/cjk/.
My exact code is this:
var Font = require('fonteditor-core').Font; var fs = require('fs'); var buffer = fs.readFileSync('fonts/NotoSansCJKsc-Bold.otf'); // read font data var font = Font.create(buffer, { type: 'otf', subset: [0, 0x5b99, 0x6d2a], hinting: false, compound2simple: false, inflate: null, combinePath: false, }); var buffer = font.write({ type: 'woff', hinting: true, deflate: null, }); fs.writeFileSync('build/output.woff', buffer);
And while I can perform other operations without issue (eg, convert the full file to ttf), this code results in mangled characters in the output file.
ttf
Any ideas on what I may be able to try to get these subsets to look correct?
The text was updated successfully, but these errors were encountered:
I'm seeing this as well. Will try a manual approach as a workaround.
Sorry, something went wrong.
Also experiencing problems with font Poppins after subsetting. Not an issue on v.1.0.5
same here
subset is a Decimal array:
subset
var font = Font.create(buffer, { type: 'otf', // subset: [0, 0x5b99, 0x6d2a], // false subset: [0, 23449, 27946], // true, 0x5b99 -> 23449, 0x6d2a => 27946 hinting: false, compound2simple: false, inflate: null, combinePath: false, });
No branches or pull requests
I am attempting to subset a font and finding that the resulting characters are completely mangled.
The font I am subsetting is Noto Sans CJK SC Bold from https://www.google.com/get/noto/help/cjk/.
My exact code is this:
And while I can perform other operations without issue (eg, convert the full file to
ttf
), this code results in mangled characters in the output file.Any ideas on what I may be able to try to get these subsets to look correct?
The text was updated successfully, but these errors were encountered: