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

bbox is undefined when embed TTC type font #634

Closed
gjSCUT opened this issue Oct 16, 2020 · 3 comments
Closed

bbox is undefined when embed TTC type font #634

gjSCUT opened this issue Oct 16, 2020 · 3 comments

Comments

@gjSCUT
Copy link

gjSCUT commented Oct 16, 2020

Here is my font:
MEIRYO.TTC.zip

When I called

pdf.embedFont(fs.readFileSync(path.resolve('fonts', 'MEIRYO.TTC')));

It throwed undefined exception:

TypeError: Cannot read property 'minX' of undefined
    at CustomFontEmbedder.<anonymous> (/home/guojun/HUE/WorkSpace/Develop/recruiting-admin-page/node_modules/pdf-lib/src/core/embedders/CustomFontEmbedder.ts:157:17)
    at step (/home/guojun/HUE/WorkSpace/Develop/recruiting-admin-page/node_modules/pdf-lib/node_modules/tslib/tslib.js:141:27)
    at Object.next (/home/guojun/HUE/WorkSpace/Develop/recruiting-admin-page/node_modules/pdf-lib/node_modules/tslib/tslib.js:122:57)
    at fulfilled (/home/guojun/HUE/WorkSpace/Develop/recruiting-admin-page/node_modules/pdf-lib/node_modules/tslib/tslib.js:112:62)
@nigamimi
Copy link

I am not really sure that CustomFontEmbedder can embed a font if CustomFontEmbedder#for accepts an extra argument for postscriptName.
I've never tried that or don't have enough knowledge about Font program.

@Leko
Copy link

Leko commented Mar 26, 2021

@Hopding
Copy link
Owner

Hopding commented Sep 24, 2021

Added this to the roadmap for tracking: #998

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

4 participants