-3

I already know the solution, but I thought I'd post it here in case anyone else has the same issue.

My marketing department asked me to embed a custom font into my PDFs generated with mPDF. I followed all of the instructions per the mPDF documentation, but I couldn't get it to work. After some debugging, an old fact about font licensing popped up in my head.

Not all fonts have web licenses or are embeddable. The safest source for "open source" fonts, with free and commercial use, is google fonts.

I was able to successfully add my new font after downloading a font from google, uploading the .ttf to the font directory, and following the instructions found at https://mpdf.github.io/fonts-languages/fonts-in-mpdf-7-x.html.

It would be a great idea to update the wiki to include that tidbit in case other people have issues adding custom fonts too.

New contributor
user31909221 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
7
  • 3
    If you know the solution, would you like to post it as a self-answer? This is considered acceptable and even encouraged. Commented yesterday
  • 1
    Please note that self-answered questions must still be separate, high quality questions (How to Ask) and answers (How to Answer). Commented yesterday
  • 2
    If you want the wiki updated, you'll need to contact the developers themselves. They won't see a post here and think "we should add that to the wiki!" Commented yesterday
  • Please take the tour so you understand how the site works. A question cannot contain the answer already- to search engines and other users it just appears to be unanswered...so it's no use to anyone. Ask a question describing your original problem, and then add your solution separately in the Answer box Commented yesterday
  • 1
    It's certainly not possible for the OP to adopt to a self-answer given the question is closed. Voted to re-open therefore. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.