<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>> <span style="font-size: 12pt;">Interesting, I did not know about this command. Here's the output I get:</span><br>
> <span style="font-size: 12pt;">Courier 7 0 Nimbus Mono L Bold </span><span style="font-size: 12pt;">/usr/local/share/fonts/ghostscript/fonts/n022004l.pfb</span></p>
<div><br>
</div>
If it shows /usr/local/share instead of /usr/share, it is coming from a package that you installed rather than a package that came with the distribution, and the problem could be customizations that you made to your system rather than problems with poppler.
<div>
<div><br>
</div>
<div>On Fedora 25, <span>/usr/share/fonts/default/Type1/n022023l.pfb is provided by <span>urw-fonts</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span>If it works for most people, the problem is probably something that you did to your system, and the easiest way to track it down might be getting the customized packages out of the path and then adding them back one by one until you find the
one that causes the problem.</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span>You can use an strace command like the one below to see everything that pdffonts touches</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span><span>strace -e trace=open pdffonts file.pdf 2>&1 | less</span></span></span></div>
<div><br>
</div>
<div><span><span></span></span>Could you check that you have your distribution's fonts installed, then temporarily rename /usr/local to get it off the path, and then try pdffonts again?<br>
<br>
Regards, William<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> poppler <poppler-bounces@lists.freedesktop.org> on behalf of Pierre-Luc Samuel <Pierre-Luc.Samuel@ticketmaster.com><br>
<b>Sent:</b> Wednesday, July 5, 2017 3:47 PM<br>
<b>To:</b> poppler@lists.freedesktop.org<br>
<b>Subject:</b> Re: [poppler] Question regarding font selection</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
<br>
On 17-07-05 01:10 PM, Jason Crain wrote:<br>
> On Wed, Jul 05, 2017 at 10:45:07AM -0400, Pierre-Luc Samuel wrote:<br>
>> On 17-07-04 06:43 PM, Albert Astals Cid wrote:<br>
>>> El dimarts, 4 de juliol de 2017, a les 17:06:07 CEST, Pierre-Luc Samuel va<br>
>>> escriure:<br>
>>>> I am experiencing weird font substitution with pdftocairo and was<br>
>>>> wondering what was the algorithm to match fonts when converting from<br>
>>>> PDF. The Courier font (regular) is being substituted "Nimbus Mono L<br>
>>>> Bold", even if fc-match return the non-bold version.<br>
>>>><br>
>>>> $ fc-match "Courier"<br>
>>>> n022003l.pfb: "Nimbus Mono L" "Regular"<br>
>>>><br>
>>>> $ fc-match "Courier:style=bold"<br>
>>>> n022004l.pfb: "Nimbus Mono L" "Bold"<br>
>>>><br>
>>>> What could be the reason behind this?<br>
>>> The pdf font can be asking for bold even if the name doesn't contain bold.<br>
>>><br>
>> Thanks for your answer Albert. I have attached a sample PDF and resulting<br>
>> SVG with the problem I'm encountering. I do not understand why the bold<br>
>> font is selected for the first "Courier".<br>
>><br>
>> pdftocairo version 0.56.0<br>
> It works for me:<br>
><br>
> $ pdffonts ~/courier.pdf -subst<br>
> name object ID substitute font substitute font file<br>
> ------------------------------------ --------- ------------------------------------ ------------------------------------<br>
> Courier 7 0 Nimbus Mono L /usr/share/fonts/type1/gsfonts/n022003l.pfb<br>
> Courier-Bold 8 0 Nimbus Mono L Bold /usr/share/fonts/type1/gsfonts/n022004l.pfb<br>
> Courier-Oblique 9 0 Nimbus Mono L Regular Oblique /usr/share/fonts/type1/gsfonts/n022023l.pfb<br>
> Courier-BoldOblique 10 0 Nimbus Mono L Bold Oblique /usr/share/fonts/type1/gsfonts/n022024l.pfb<br>
><br>
> With versions 0.48.0 and from git master.<br>
<br>
Interesting, I did not know about this command. Here's the output I get:<br>
<br>
<br>
name object ID substitute <br>
font substitute font file<br>
------------------------------------ --------- <br>
------------------------------------ ------------------------------------<br>
Courier 7 0 Nimbus Mono L Bold <br>
/usr/local/share/fonts/ghostscript/fonts/n022004l.pfb<br>
Courier-Bold 8 0 Nimbus Mono L Bold <br>
/usr/local/share/fonts/ghostscript/fonts/n022004l.pfb<br>
Courier-Oblique 9 0 Nimbus Mono L Regular <br>
Oblique /usr/local/share/fonts/ghostscript/fonts/n022023l.pfb<br>
Courier-BoldOblique 10 0 Nimbus Mono L Bold <br>
Oblique /usr/local/share/fonts/ghostscript/fonts/n022024l.pfb<br>
<br>
Pierre-Luc<br>
_______________________________________________<br>
poppler mailing list<br>
poppler@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/poppler" id="LPlnk368945" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/poppler</a>
<div id="LPBorder_GT_14993402417590.7545091180511236" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14993402417560.77004497987084" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_14993402417570.515434726671594" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14993402417570.6560002770056264"></div>
<div id="LPTitle_14993402417570.8356012354410542" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14993402417580.4045174453890372" href="https://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank" style="text-decoration: none;">poppler Info Page - freedesktop.org</a></div>
<div id="LPMetadata_14993402417580.3582830648410258" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_14993402417580.384067457290854" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to poppler: Subscribe to poppler by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>