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

how can i use ttc font #1208

Open
qlynick opened this issue Apr 6, 2022 · 3 comments
Open

how can i use ttc font #1208

qlynick opened this issue Apr 6, 2022 · 3 comments

Comments

@qlynick
Copy link

qlynick commented Apr 6, 2022

What are you working on?

when i load ttc font.
can not use it.

`
var font_url = '/examples/pdf/font/AppleSDGothicNeo.ttc'
const fontBytes = await fetch(font_url).then(res => res.arrayBuffer())

const pdfDoc = await PDFDocument.create();
pdfDoc.registerFontkit(fontkit)
const customFont = await pdfDoc.embedFont(fontBytes, { subset: true })
`

can anybody help me?

Additional Notes

No response

@joewestcott
Copy link

Hi @qlynick,

Font subsetting is not well supported right now. See #494 (comment).

A fix for subsetting is here, which is waiting on feedback from @Hopding at the moment.

For now, you may need to avoid the {subset: true } option.

@madara3
Copy link

madara3 commented May 29, 2023

Hi @qlynick,

how did you initialize fontkit, can you share the code? thanks

@qlynick
Copy link
Author

qlynick commented Sep 20, 2023

Hi @qlynick,

how did you initialize fontkit, can you share the code? thanks
I've given up 😂

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

No branches or pull requests

3 participants