Forum Bugs

problem with font embedding with ligatures

heycam
Hello,

I have a problem with the PDFs prince generates for me and I suspect it has something to do with font embedding. The PDF I generate (on my Mac) looks fine when I view it in Preview or in Adobe Reader, but other people are having trouble viewing it. If I have the PDF open in Preview, and I choose to export it to a new PDF (File -> Export, Format: PDF, Quartz Filter: None) then the output has missing text.

I've reduced the problem somewhat. This file triggers the problem:

<!DOCTYPE html>
<style> p { font: 16pt 'Myriad Pro'; font-variant: prince-opentype(liga); }</style>
<p>normal fi</p>
<p><i>italic</i></p>
<p><b>bold fi</b></p>
<p>normal</p>
<p><b>bold</b></p>
<p><i>italic</i></p>


What specifically triggers the problem is the ligature substitution. You can see that the normal and bold text includes an "fi" ligature, but the italic text does not. In the exported PDF, only the italic text shows up. The normal and bold text is not visible.

This happens with a couple of different fonts that I chose that have liga tables.

My question is whether the PDF that Prince is generating is invalid in some way, tripping up Preview when I choose to export from it (and preventing some other people from being able to view the document properly).

Thanks,

Cameron
heycam
Here are the PDFs.
  1. out.pdf54.3 kB
    PDF produced by exporting from Preview.
  2. test.pdf143.4 kB
    PDF generated by Prince.
mikeday
It's a bug in MacOS X Preview, which we are working around in the next release of Prince. Send me an email (mikeday@yeslogic.com) if you would like to try out a pre-release build.
mikeday
Prince 8.1 is now available, and includes a workaround for the font issue that affects MacOS X Preview.
heycam
Great, thanks Mike!