Closed daliusd closed 5 years ago
This is documented in the README under “Subsets”. The cmap
, post
and name
tables are missing, if I recall correctly.
@moyogo Yes, I know that. Problem is that pdfkit fails to render from this subset and this is primary use case for fontkit. FontForge seems to manage to read this subset file despite missing tables.
I have tried to use .path.toSVG()
and characters seems to be rendered correctly. So I assume only created subset file might be wrong.
Do you have an example using pdfkit where this fails?
It looks like this problem was fixed in fontkit 1.8.0. I can reproduce it with fontkit 1.7.8 but not with 1.8.0.
I have created demo project if you are still interested in it https://github.com/daliusd/pdfkitfail
fontkit 1.7.8
Here is "Rasa" font with the problem: http://fonts.gstatic.com/s/rasa/v3/xn7vYHIn1mWmTqI.ttf . Actually there are more fonts that demonstrate this problem.
Download ttf, rename to rasa.ttf and run this script:
I have opened subset.ttf with FontForge and only "r" letter retains proper layout. Other letters are corrupted somehow. If I use other font that works properly (e.g. Roboto Condensed) then I don't have any problem.
Is there anything I could do to solve this problem? Maybe I can disable font subsetting in pdfkit?