[Feature] I want specific fonts that don't make the file large
black-black-cat opened this issue · 0 comments
Is there an existing issue for this feature?
- Yes, I have searched the existing issues and it doesn't exist.
Feature Description
Hi there,
I'm encountering a significant file size increase when using the Noto Sans SC font in generated PDFs. My files are jumping from around 600KB to 6MB, which is quite a leap.
I understand that some fonts can contribute to file size, and I'm curious if there are any potential solutions or workarounds to mitigate this with those large size file font like Noto Sans SC.
Does referring to this answer this answer, Hopding/pdf-lib#207 (comment), help to solve the problem?
const ubuntuBytes = ...
const ubuntuFont = await pdfDoc.embedFont(ubuntuBytes, { subset: true })
PS.
I just read the doc about the exporting font.
There are other downsides to PDFs, such as font compatibility. However, Reactive Resume addresses this issue by embedding the font you choose in the app into the PDF. This may increase the file size slightly, but guarantees that your resume will display correctly regardless of the PDF reader used by the viewer.