Skip to content
Snippets Groups Projects

Update docs for adding fonts to dompdf now that it's possible to do it and survive upgrade

Merged DaveD requested to merge DaveD/installation:dompdf-font into master
1 unresolved thread

In 5.43 you can set a path to an external font folder so that your unicode fonts don't get wiped on upgrade.

Also have added some instructions for CJK fonts since those aren't included even in the full dompdf that comes with civi+drupal 8/9.

Merge request reports

Approval is optional

Merged by homotechsualhomotechsual 3 years ago (Sep 30, 2021 3:57pm UTC)

Merge details

  • Changes merged into master with 5e6e63e9.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 25 'bold_italic' => $fontDir . '/DejaVuSansMono-BoldOblique',
    26 'italic' => $fontDir . '/DejaVuSansMono-Oblique',
    27 'normal' => $fontDir . '/DejaVuSansMono',
    28 ],
    29 'dejavu serif' => [
    30 'bold' => $fontDir . '/DejaVuSerif-Bold',
    31 'bold_italic' => $fontDir . '/DejaVuSerif-BoldItalic',
    32 'italic' => $fontDir . '/DejaVuSerif-Italic',
    33 'normal' => $fontDir . '/DejaVuSerif',
    34 ],
    35 ];
    36 ```
    37 1. Visit Administer - System Settings - Misc and in the field for `DOMPDF Font Folder` put the full path to the font folder you created.
    38 1. When composing the PDF, if you have pasted from Microsoft Word into CKEditor it might set a specific font and then you will still see `?` in the output. You can click the Source button on the CKEditor toolbar to check - look for e.g. `<p style="font-family: Arial;">`.
    39
    40 ### Additional steps for CJK or an alternate unicode font
  • Thanks for this - two minor points :-)

  • DaveD added 1 commit

    added 1 commit

    • 132a759b - docs for adding fonts to dompdf

    Compare with previous version

  • homotechsual mentioned in commit 5e6e63e9

    mentioned in commit 5e6e63e9

  • merged

  • Author Maintainer

    Thanks!

  • Please register or sign in to reply
    Loading