title: Some characters (like "less or equal than") are not showed when using mpdf
body: <p>We use OpenSans font to publish bulletins in HTML thru our server. No problems at all with any character. Entities like &quot;≤&quot; are showed correctly in web browsers, cause they are in that font charset (see HTML screenshot). However, in same server, generated mPDF PDF is missing not even &quot;extended&quot; characters, but the included ones (like &quot;less or equal&quot;) in OpenSans (see mPDF screenshot).
  There is no difference using CSS or the mPDF default font definition inside PHP coding. Same result. Characters are showed like squares.</p>
  <p>Folder &quot;fonts&quot; exist in place and the &quot;ttf&quot; files too.</p>
  <p>Please, any idea what's happening? Is related to font in (Debian) server?</p>
  <p>Here is the PHP file code. The HTML version is only the HTML embedded is this code.</p>
  <pre><code>&lt;?php
  
  require_once __DIR__ . '/vendor/autoload.php';
  
  $mpdf = new \Mpdf\Mpdf(['debug' =&gt; true]);
  
  
  $html = '
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot; /&gt;
  &lt;style&gt;
  @font-face
  {
      font-family:&quot;Open Sans&quot;;
      font-style:normal;
      font-weight:normal;
      src:url(&quot;./fonts/OpenSans-Regular.eot&quot;); /* IE9 Compat Modes */
      src:local( local(&quot;OpenSans-Regular&quot;),
          url(&quot;./fonts/OpenSans-Regular.eot?#iefix&quot;) format(&quot;embedded-opentype&quot;), /* IE6-IE8 */
          url(&quot;./fonts/OpenSans-Regular.woff&quot;) format(&quot;woff&quot;),  /* Modern Browsers */
          url(&quot;./fonts/OpenSans-Regular.ttf&quot;) format(&quot;truetype&quot;),  /* Safari, Android, iOS */
          url(&quot;./fonts/OpenSans-Regular.svg#OpenSans&quot;) format(&quot;svg&quot;);  /* Legacy iOS */
  }
  
  @font-face
  {
      font-family:&quot;Open Sans Condensed Light&quot;;
      font-style:normal;
      font-weight:normal;
      font-stretch: ultra-condensed;
      src:url(&quot;./fonts/OpenSans-CondLight.eot&quot;); /* IE9 Compat Modes */
      src: local(&quot;OpenSans-CondLight&quot;),
      url(&quot;./fonts/OpenSans-CondLight.eot?#iefix&quot;) format(&quot;embedded-opentype&quot;), /* IE6-IE8 */
      url(&quot;./fonts/OpenSans-CondLight.woff&quot;) format(&quot;woff&quot;),  /* Modern Browsers */
      url(&quot;./fonts/OpenSans-CondLight.ttf&quot;) format(&quot;truetype&quot;),  /* Safari, Android, iOS */
      url(&quot;./fonts/OpenSans-CondLight.svg#OpenSans&quot;) format(&quot;svg&quot;);  /* Legacy iOS */
  }
  
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p style=&quot;font-family:\'Open Sans\';&quot;&gt;
          OpenSans&lt;br/&gt;
          HEX CODE    &amp;#x2264;&lt;br /&gt;
          HTML CODE   &amp;#8804;&lt;br /&gt;
          HTML ENTITY &amp;le;&lt;br /&gt;
          À Á Å å ā ă ñ Ñ ✓ ℃ ℉ 元 + − × ÷ = ≠ ¾ ⋜ ‰ ≏ ≢ ⊨ ∅ ∉ ∑ ∛ ∞ ∫ ≃ ⋚ ♳ 3  ∀(x, y ∈ A ∪ B; x ≠ y) x² − y² ≥ 0&lt;br /&gt;
      &lt;/p&gt;&lt;/p&gt;
  
      &lt;/br&gt;
      &lt;p style=&quot;font-family:\'Open Sans Condensed Light\';&quot;&gt;
          OpenSans Condensed Light&lt;br/&gt;
          HEX CODE    &amp;#x2264;&lt;br /&gt;
          HTML CODE   &amp;#8804;&lt;br /&gt;
          HTML ENTITY &amp;le;&lt;br /&gt;
          À Á Å å ā ă ñ Ñ ✓ ℃ ℉ 元 + − × ÷ = ≠ ¾ ⋜ ‰ ≏ ≢ ⊨ ∅ ∉ ∑ ∛ ∞ ∫ ≃ ⋚ ♳ 3  ∀(x, y ∈ A ∪ B; x ≠ y) x² − y² ≥ 0&lt;br /&gt;
      &lt;/p&gt;
  
      &lt;/br&gt;
      &lt;p style=&quot;font-family:\'Arial\';&quot;&gt;
          Arial&lt;br/&gt;
          HEX CODE    &amp;#x2264;&lt;br /&gt;
          HTML CODE   &amp;#8804;&lt;br /&gt;
          HTML ENTITY &amp;le;&lt;br /&gt;
          À Á Å å ā ă ñ Ñ ✓ ℃ ℉ 元 + − × ÷ = ≠ ¾ ⋜ ‰ ≏ ≢ ⊨ ∅ ∉ ∑ ∛ ∞ ∫ ≃ ⋚ ♳ 3  ∀(x, y ∈ A ∪ B; x ≠ y) x² − y² ≥ 0&lt;br /&gt;
      &lt;/p&gt;
  
      &lt;/br&gt;
      &lt;p style=&quot;font-family: \'Times New Roman\', Times, serif;&quot;&gt;
          Times New Roman&lt;br/&gt;
          HEX CODE    &amp;#x2264;&lt;br /&gt;
          HTML CODE   &amp;#8804;&lt;br /&gt;
          HTML ENTITY &amp;le;&lt;br /&gt;
          À Á Å å ā ă ñ Ñ ✓ ℃ ℉ 元 + − × ÷ = ≠ ¾ ⋜ ‰ ≏ ≢ ⊨ ∅ ∉ ∑ ∛ ∞ ∫ ≃ ⋚ ♳ 3  ∀(x, y ∈ A ∪ B; x ≠ y) x² − y² ≥ 0&lt;br /&gt;
      &lt;/p&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  ';
  
  $mpdf-&gt;WriteHTML($html);
  
  $mpdf-&gt;Output();
  </code></pre>
  <p><a href="https://i.stack.imgur.com/9XoCL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9XoCL.png" alt="HTML screenshot showing all characters with any font" /></a>
  <a href="https://i.stack.imgur.com/FZQH8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FZQH8.png" alt="mPDF PDF screenshot - Character &quot;less or equal&quot; is gone" /></a></p>
  <p>There is no difference if I add at beginning</p>
  <pre><code>$defaultConfig = (new Mpdf\Config\ConfigVariables())-&gt;getDefaults();
  $fontDirs = $defaultConfig['fontDir'];
  
  $defaultFontConfig = (new Mpdf\Config\FontVariables())-&gt;getDefaults();
  $fontData = $defaultFontConfig['fontdata'];
  
  $mpdf = new \Mpdf\Mpdf([
      'fontDir' =&gt; array_merge($fontDirs, [
          __DIR__ . '/fonts',
      ]),
      'fontdata' =&gt; $fontData + [
          'open-sans' =&gt; [
              'R' =&gt; 'OpenSans-Regular.ttf',
              'C' =&gt; 'OpenSans-CondLight.ttf',
          ]
      ],
      'default_font' =&gt; 'open-sans' // Or even 'opensans' doesn't work
  ]);
  </code></pre>
  <p>Neverending story:
  To test what's happening with that &quot;unexistent&quot; characters on mPDF, I remove any font reference in CSS, and same result. That characters doesn't appear in mPDF output. To try to guess where mPDF is getting open-sans fonts, I installed on my Debian server &quot;open-sans&quot; fonts (by default, only &quot;Deja-Vú&quot; fonts are installed). Same result. So, from where is getting mPDF that incomplete set of open-sans fonts???</p>