LDX Design

LearnDash Design & Tutorials

LearnDash Design & Tutorials

LearnDash Certificate Font Issues: Question Marks, Accents & How to Fix Them

Having trouble with certain unicode characters on your LearnDash certificates? Do you have students whose names contain letters with special accent marks? Or are you just seeing question marks on your certificates and have no idea why?

LearnDash allows you to offer certificates to your students after successful completion of quizzes and/or courses, but in rare cases, the student’s name might not appear correctly. The most common reason for this is the default font used for PDF generation doesn’t support certain special characters.

Update: 5 Feb 2020: Abdulwahab shared with me a response he received from LearnDash support. Since this was an official response from LearnDash, I’m going to include that solution first.

I’ll keep the initial/old solution further down the page just in case.


I’m pasting LearnDash support’s exact response, word-for-word. I have not tried it out, but it worked for Abdulwahab, and it should work on any LearnDash site.


In order to use non-english characters on your certificate, you must utilize a Unicode-enabled font.

Here are the steps you can take to set up a unicode font to be used on your site for all your certificates.

Remember to take a complete backup of the site before making any changes.

1. Create a new folder in our common LearnDash directory:

2. Next, using FTP or similar, move all the fonts from /wp-content/plugins/sfwd-lms/includes/lib/tcpdf/fonts/ and copy them to /wp-content/uploads/learndash/tcpdf/fonts/

3. In your active theme’s functions.php file (or using the Code Snippets plugin), add the following code snippet:

add_action( 'learndash_init', function() {
	if ( ! defined( 'K_PATH_FONTS' ) ) {
		$wp_upload_dir = wp_upload_dir();
		$basedir = str_replace( '\\', '/', $wp_upload_dir['basedir'] );
		$ld_tcpdf_fonts_dir = trailingslashit( $basedir ) . 'learndash/tcpdf/fonts/';
		define( 'K_PATH_FONTS', $ld_tcpdf_fonts_dir );

4. Now you can go about adding custom fonts as you like into this folder and no worries about the next time updating LearnDash.

As a final note, due to how the TCPDF config file is coded in /wp-content/plugins/sfwd-lms/includes/lib/tcpdf/config/tcpdf_config.php, you may see a PHP notice about K_PATH_FONTS already defined. This is because in the tcpdf_config.php file it does not first check if 'K_PATH_FONTS' is possibly already defined.

To create the font files, you can use any of the below tools:

Here is a link to an already converted Unicode font:
👉 Arial Unicode Font

👇 Here’s the initial/old solution 👇

Shoutout: Kudos to Ken & Patrick from the LearnDash LMS Tips & Tricks Facebook Group for raising the issue and finding the solution.

Quick Background on Certificate Generation

…or just jump right to the solution.

I just recently learned this myself, but it’s helpful to have a basic understanding on how LearnDash generates certificates. Here’s the super-simple, non-technical explanation.

LearnDash uses a third-party script called TCPDF to take the information you enter on a certificate in WordPress and convert it into a PDF that is generated on the fly. This script is included with the LearnDash plugin, and it comes with a handful of pre-determined defaults. One of those defaults is the font. Herein lies the issue.

LearnDash Default Certificate Font

By default, LearnDash sets the TCPDF default font to Helvetica. If you want to see it for yourself, open this file:

TCPDF default font code
Here’s the actual code that sets the default font for TCPDF in the config file

The version of Helvetica that comes with TCPDF in LearnDash doesn’t support every single character in the UTF-8 character set. I did some testing, and here’s an example of similar characters that it supports & doesn’t support.

  • Supports: è, é, ê, ë
  • Does not support: ē, ė, ę

I also tested it using the default serif font, adding <span style="font-family: serif;"> around the characters, but I got the same result as above.

How to Change the Default Certificate Font

I didn’t test every single unicode character (that’d be crazy 🤯), but I did test all the versions of the e above with the following fonts. I’m hopeful that if a font supports those characters, it should support the rest. Here’s what I know works:

Font Family Support
Open Sans Yes
Roboto Yes
Raleway Yes
Libre Baskerville Yes
Merriweather Yes
Montserrat Yes
Lato No

I only tested the “Regular” 400 weight version of each font. You can download a .zip file of all the TCPDF files for the above fonts. Choose one you like. Then skip to step #4 below.

LearnDash also has a TCPDF version of Arial here.

If you try this with other fonts, please let us know in the comments.

1. Download New Font from Google Fonts

  1. Navigate to fonts.google.com
  2. Search for the font you want to use (we’re using Open Sans in this example)
  3. Click the + icon to add it to your selection
  4. Click the download icon to download it to your computer

2. Convert Font from TTF to TCPDF Format

  1. Locate the .TTF file on your computer
  2. Navigate to fonts.snm-portal.com
  3. Drag’n’drop the .TTF file into the drop zone
  4. Check the box that says you have the rights to convert this font

3. Download TCPDF Font Files

  1. Make note of the Fontname value. You’ll need this in a second.
  2. Right-click and Save As for each of the three files:
    • opensans.z
    • opensans.ctg.z
    • opensans.php

4. Copy TCPDF Files to LearnDash

Using SFTP, or your method of choice, upload those three files into this directory:


5. Update TCPDF Config File

Finally, you need to edit this file:


Search for this line:

define ('PDF_FONT_NAME_MAIN', 'helvetica');

Replace it with this line:

define ('PDF_FONT_NAME_MAIN', 'opensans');

You would change opensans to whatever your Fontname is.

IMPORTANT! Any time you update LearnDash to a new version, your code will be erased. You’ll likely need to upload the font files again, and edit the config file. Currently, there is no way around this, so save those 3 files.

Certificates in LearnDash 3.0

LearnDash 3.0 is scheduled for release sometime in Q1 2019. The CEO, Justin, has mentioned there will be improvements to LearnDash certificates. I’m hoping there might be some built in font choices, or at least better support for changing the default font without editing the plugin files.

Speaking of LearnDash certificates: Patrick has a LearnDash certificate tracker plugin you can download for free here. (Offered “as-is”. No support.)


How to Hide or Move LearnDash Progress Dots


How to Display Course Title Over the Image in LearnDash Course Grid


  1. Kakybat

    very useful post!!!

  2. only24

    Hi! If you want to continue update your plugin you can define font in wp_config.php file in root of your site.

  3. Vitaly

    Very nice post!

  4. Ashraf Reda

    Very thanks, it solves 80% of the issue.
    I still search for Arabic font which it’s letters display correctly.

  5. Thank you for updating your valuable post.
    I used this method with Arabic font and works fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén