Created attachment 55066 [details] [review] A patch that solves this bug As we know, ttf and otf are essentially the same format with some different conventions. Therefore, they should be treated alike. In function [void GfxFont::findExtFontFile] in GfxFont.cc and [GlobalParams::getDisplayFont], poppler is testing font's extension names. However, poppler only tested ".ttf", ignoring .otf files. This will cause pdfs with unembedded fonts being rendered poorly even if fontconfig is configured properly, as long as the correct options have .otf format. To reproduce this problem, remove the URW++ type 1 fonts if you have any. Configure fontforge to use Truetype/Opentype fonts like Liberation Fonts or Tex Gyre Fonts to substitute the standard postscript fonts. Then, make sure the suffices of these fonts are .otf. Then open a pdf with unembedded fonts, and the bug should occur. A simple patch that solves this problem is attached.
Comment on attachment 55066 [details] [review] A patch that solves this bug I tested the patch with an OpenType/CFF font and it seems to work with both splash and cairo. Somewhat related I have a patch I have been using to debug font substitution problems that shows what fonts are used for the substitution. See bug 44416.
Adrian if you have confirmed it works with both splash and cairo, please commit to master and 0.18 branches
Pushed to master and 0.18 branch.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.