[poppler] Question regarding font selection

Albert Astals Cid aacid at kde.org
Tue Jul 4 22:43:01 UTC 2017


El dimarts, 4 de juliol de 2017, a les 17:06:07 CEST, Pierre-Luc Samuel va 
escriure:
> 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?  

The pdf font can be asking for bold even if the name doesn't contain bold.

> 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?  

It does, why wouldn't it?

Cheers,
  Albert

> Would it be better to use fontconfig's FcFontMatch() ?
> 
> Thanks,
> Pierre-Luc
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler




More information about the poppler mailing list