Fixing fonts issues

If all of a sudden, there is something wrong with the font’s format, like with overlapping text:

…or bad letter-spacing:

…then you may simply need to re-install your fonts. Fortunately, that is a very quick process.

Quick Fix: Reinstalling the fonts #

  • Path: WooCommerce > PDF Invoices > Advanced > Tools, then scroll down to click the ‘Reinstall fonts’ button.

Causes #

Something causes the font plugin files to either get moved to a new, unreachable location to our plugin or to just get deleted.

  • If there was some sort of site migration, then the font folder could have been left non-copied.
  • If there was some sort of site scanning plugin, it is very possible it emptied temporary folders, which in turn would delete our plugin’s font files – as they are located in a temporary folder.

Permanent Solutions #

Set Exception #

If you can set exceptions when performing some type of site scan or cleanup, the folder you would need to exclude from the cleanup is: wp-content/uploads/wpo_wcpdf_xxxxxx/fonts.

Note: The ‘xxxxxx’ represents any random sequence of numbers that was generated.

A screenshot that displays the plugin's temporary folder name
A screenshot that displays the plugin's font files

This folder’s location can be found in the Advanced tab:

  • Path: WooCommerce > PDF Invoices > Advanced > Status, then scroll down to Write Permissions.
  • In this Write Permissions table, the row we are interested in is titled: DOMPDF fonts folder (needs to be writable for custom/remote fonts).
An image of the Write Permissions table