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

[Performance] WOFF font format for CJK languages is 5x slower in Chrome and Unresponsive in Firefox #321

Open
Saranya-Sivanandham opened this issue Oct 13, 2023 · 1 comment

Comments

@Saranya-Sivanandham
Copy link

We are using PDFMake which in turn makes use of PDFKit to generate a text-only single-page PDF.

For languages Chinese, Hebrew & Japanese, we are making use of the below Google font in WOFF format downloaded from Google Webfonts helper.

Chinese - Noto Sans SC (1.5 MB) Download link Choose Historic support to get WOFF format.

Japanese / Hebrew - M PLUS 1p regular Download link Choose Historic support to get WOFF format.

For the above languages with the mentioned fonts, the pdf download takes around 8 seconds - 11 seconds for a single page. However, for other languages, it is way lesser ~ around 1 -2 seconds.

With TTF it works better.

Note: Unable to upload woff font in GitHub. So shared the link from where I downloaded it.

@blikblum
Copy link
Member

Are you creating the PDF in server side and downloading? If so the problem can be the PDF size due to the font used.

To see if is a perf problem of the library is necessary to measure the time to create the pdf eliminating the network transfer variable

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

2 participants