Incorrect text/font encoding for certain OSX fonts
Submitted by Kevin
Link to original bug (#769122)
Description
PDFs created through weasyprint looked visually great, but when copying text resulted in unknow characters. In doing some testing it does seem to be a reproducible error with how pango is handling fonts on OSX. I was able to recreate the issue directly w/ a simple test using pango-view
It does seem to be a font specific issue. If you specify certain fonts directly you'll get a clean PDF with copyable text.
A work around seems to be using some subset of OSX fonts that convert correctly.
Some of the more common fonts failed:
font="Helvetica"; pango-view --no-display --output out_${font}.pdf --text 'The quick brown fox jumped over the lazy dog.' --font "${font}"; open "out_${font}.pdf"
RESULT: out_Helvetica -
Version: 1.40.x