Forum How do I...?

Font Embedding and Subsetting

JakubJaroszewski
Hi,

I have a question regarding subsetting embedded font.
I was trying to create a document with the embedded font "Noto CJK": https://www.google.com/get/noto/help/cjk/

The problem is, that font is not being subsetted. This is indicated both by the file size (13 MB for 1 line of HTML) and also by inspecting the font used. I have found this in the documentation:

"Font subsetting is disabled automatically for individual fonts that do not grant permission to subset, or if Prince cannot subset them for some other reason."

Are there particular file formats for fonts, which make it impossible for Prince to subset them? Or is this particular font that causes subsetting to not work? I have tried running with debug option, however, there is no information regarding subsetting there.

Thanks for any help in advance.
Kind regards,
Jakub Jaroszewski

mikeday
Which version of Prince are you using? Support for subsetting CFF fonts was added in Prince 13.
JakubJaroszewski
Thank you very much for your help. I am unfortunately using Prince 10 and I am not really sure whether it Is possible for me to change it. I will try to either update it or more likely find a TTF font, which I can use, now I know what the problem is. Again thanks a lot for your help.
JakubJaroszewski
Hi,

Just one more quick question. We use Prince in lots of codebases, which haven't been touched for a long time and we wouldn't want to break them. If we were to upgrade from Prince 10 to the newest version should we expect lots of problems with migration? Or is there strong support for backward compatibility? If there are any large changes to the API would it be possible for you to point me to some documentation so that I can assess the amount of work needed? Sorry about asking so many questions, but knowing this would it much easier to decide whether we should consider upgrading.

Kind regards,
Jakub Jaroszewski
mikeday
The API has not changed so Prince should still run as expected, however there have been some changes to layout which means some documents could look slightly different. For example, the default line-height value is now taken from the font, which means it may not be 1.2, the old value.