0

I am using Verdana for DOMPDF.

I have added below code:

'verdana' =>
array(
    'bold' => DOMPDF_DIR . '/lib/fonts/Verdana_Bold',
    'bold_italic' => DOMPDF_DIR . '/lib/fonts/Verdana_Bold_Italic',
    'italic' => DOMPDF_DIR . '/lib/fonts/Verdana_Italic',
    'normal' => DOMPDF_DIR . '/lib/fonts/Verdana',
),

Verdana is working fine. I want to use bold for this. font-weight: bold; not working

Any help?

Thanks

  • Is Verdana working fine? You can't just add that code, the font files also have to be present as well as the font metrics (*.UFM files). Use the load_font.php script to add the files or `@font-face` CSS declaration ([ref](https://github.com/dompdf/dompdf/wiki/UnicodeHowTo)). If you're using v0.6.2 (and you should be) you might try using the DejaVu fonts instead ([ref](https://github.com/dompdf/dompdf/wiki/About-Fonts-and-Character-Encoding)). – BrianS Jan 26 '16 at 17:38
  • @BrianS Verdana is working fine. But bold is not working. – Manmohan Singh Jan 27 '16 at 09:33
  • How did you add the font to dompdf? Do all those files (with a *.ttf extension) exist in the lib/fonts directory? – BrianS Jan 27 '16 at 16:06
  • 1
    @BrianS Working fine now. I added .ttf font for vardana. Earlier only .afm was added. thanks for your support. – Manmohan Singh Jan 29 '16 at 05:24
  • Excellent, you might write up an answer to help out future StackOverflow users. Also relevant is this question: http://stackoverflow.com/q/35048509/264628. – BrianS Jan 29 '16 at 14:36

0 Answers0