[poppler] Question regarding font selection

Pierre-Luc Samuel Pierre-Luc.Samuel at ticketmaster.com
Tue Jul 4 21:06:07 UTC 2017


Hi,

I am experiencing weird font substitution with pdftocairo and was 
wondering what was the algorithm to match fonts when converting from 
PDF.  The Courier font (regular) is being substituted "Nimbus Mono L 
Bold", even if fc-match return the non-bold version.

$ fc-match "Courier"
n022003l.pfb: "Nimbus Mono L" "Regular"

$ fc-match "Courier:style=bold"
n022004l.pfb: "Nimbus Mono L" "Bold"

What could be the reason behind this?  I've been poking around the code 
to find the answer and I see the substitution algorithm is quite 
complicated.  Is there a reason why poppler doesn't use standard system 
matching?  Would it be better to use fontconfig's FcFontMatch() ?

Thanks,
Pierre-Luc


More information about the poppler mailing list