Custom Fonts for DOMPDF

前端 未结 3 1339
囚心锁ツ
囚心锁ツ 2020-12-23 17:22

I\'m Using DOM PDF 0.6.0 Beta 2. I want to use custom fonts (Fonts: \'Segeo Print\', \'Lucida Handwriting\',\'Airplanes in the Night Sky\') in PDF file.

I followed t

3条回答
  •  天涯浪人
    2020-12-23 18:13

    1. go to your DOMPDF folder
    2. copy your font's as .ttf (TrueType Font) or .otf (OpenType Font) into the DOMPDF's root
    3. open your command line and run
      php load_font.php your_fonts_name ./your-normal.ttf ./your-bold.ttf ./your-bold-italic.ttf
    4. DOMPDF now created Adobe Font Metrics and copied it to lib/fonts/* - you can now use it with
      font-family: your_fonts_name;

提交回复
热议问题