Forum Bugs

PDF with OTF subsetting is still too large

yyang
The OTF subsetting does reduces the PDF size remarkably. Thanks for your great work! But compared to TTF subsetting, the generated PDF is still too large... My test files are included as the attachment.

Test1 uses "Alibaba PuHuiTi 2.0", a TTF Chinese font. The Prince generated PDF is 7.5 KB.

Test2 uses "Source Han Sans SC", an OTF Chinese font. The Prince generated PDF bumps to 1.09 MB.

Test3 also uses "Source Han Sans SC". The PDF generated by XeLaTeX is 6.3 KB.

I guess there is considerable technical difficulties in OTF subsetting... For instance, Adobe Illustrator exports reasonably small PDF, but for Serif Affinity Designer, even a single character leads to MB-level size increase.
  1. tests.zip1.2 MB
mikeday
Right, I think this may be due to some shared procedures in the CFF font which require extra work to subset, we may be able to improve this in the future.
mikeday
The latest build of Prince now includes support for subsetting shared procedures in CFF fonts, which should reduce the file size considerably.
yyang
It's truly amazing! And the "--http-header" option is more than welcome. You are my hero.
mikeday
Thank you but I am just the messenger! The CFF compression was thanks to the work of Wesley Moore and the HTTP header option is thanks to Peter Wang. :D