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

substFormat: 1 is not yet supported for Calibri Font #415

Closed
xornor-web opened this issue Dec 9, 2019 · 1 comment · Fixed by #486
Closed

substFormat: 1 is not yet supported for Calibri Font #415

xornor-web opened this issue Dec 9, 2019 · 1 comment · Fixed by #486

Comments

@xornor-web
Copy link

xornor-web commented Dec 9, 2019

Expected Behavior

SubSet Font not creating for Calibri Font

Current Behavior

Error: lookupType: 7 - substFormat: 1 is not yet supported
at FeatureQuery.getLookupMethod (..\node_modules\opentype.js\dist\opentype.js:12239:20)
at FeatureQuery.lookupFeature (..\node_modules\opentype.js\dist\opentype.js:12295:34)
at ..\node_modules\opentype.js\dist\opentype.js:12720:43
at Array.forEach ()
at Bidi.latinLigature (..\node_modules\opentype.js\dist\opentype.js:12718:28)
at C:\Users\Xornor\nodeJSpro\pptx2html\node_modules\opentype.js\dist\opentype.js:12911:24
at Array.forEach ()
at Bidi.applyLatinLigatures (..\node_modules\opentype.js\dist\opentype.js:12910:13)
at Bidi.applyFeaturesToContexts (..\node_modules\opentype.js\dist\opentype.js:12932:30)
at Bidi.processText (..\node_modules\opentype.js\dist\opentype.js:12947:15)

Steps to Reproduce (for bugs)

  1. I am creating calibri.ttf suset font from Node but error occurring
let filePath = "calibri.ttf";
let desFilePath = "sub_calibri.ttf";
var font = opentype.loadSync(filePath);
var subsetFont = undefined;
var glyphs = font.stringToGlyphs("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
subsetFont = new opentype.Font({
    familyName: font.names.fontFamily.en,
    styleName: font.names.fontSubfamily.en,
    unitsPerEm: font.unitsPerEm,
    ascender: font.ascender,
    descender: font.descender,
    glyphs: glyphs
});
fs.writeFileSync(desFilePath, Buffer.from(subsetFont.toArrayBuffer()));
var fontEnable = opentype.loadSync(desFilePath);
@Connum
Copy link
Contributor

Connum commented Oct 22, 2020

I'm currently working on writing support for lookup type 6 (format 1 and 3 are done) and hope to find the time to implement all other missing lookup types as well.

@Connum Connum linked a pull request Feb 5, 2023 that will close this issue
8 tasks
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

Successfully merging a pull request may close this issue.

2 participants