PDF format is capable of embedding fonts. CraftMyPDF not only supports Google fonts but also supports custom fonts.
In this short tutorial, we are going to guide you to use your own custom fonts with CSS style for your PDF template.
Now we support Custom Fonts in the Settings tab, you do not need to use CSS for custom fonts anymore.
Step 1 – Upload a font or use a CDN font
You may upload your custom fonts to online storage or use a font that is available on CDN such as https://www.cdnfonts.com/
Step 2 – Navigate to Settings
In the Additional CSS field, paste the CSS snippet in the text field.
Please make sure that the custom font starts with “https://“. Remember to click on the Apply button.
(i) If you are using a font on cdnfonts.com, please make sure to change the protocol to https:// and use @import to load the font CSS.
(ii) In addition, If you are using a custom font in your own CDN, you have to use the @font-face CSS at-rule to specify the location.
Step 3 – Changing the font property
In the PDF template designer, click to select a label and enter the font name, and press Enter