• Skip to primary navigation
  • Skip to main content
LogoMain
WP Desk

WP Desk

WooCommerce Plugins

Flexible Invoices

Flexible Invoices

Automate invoicing

ShopMagic

ShopMagic

E-mail automations

Flexible Coupons

  • Pricing
  • Add-ons
  • Docs
  • Support
  • Blog
  • Ideas
  • My Account
How to customize WooCommerce PDF Coupons with custom fonts – case study

Published: 2025-07-14 / Updated: 2025-12-04 / Blog

How to customize WooCommerce PDF Coupons with custom fonts – case study

Krzysztof Skorupa

Certainly, if you’re creating WooCommerce PDF coupons, you want them to look professional and fully match your brand identity. Therefore, in this article we’ll show you how to add a custom font to your PDF coupon using the Flexible PDF Coupons PRO plugin. In practice, this solution is useful for anyone who wants to go beyond the default options of the WooCommerce coupon editor, while keeping the process simple.

Issue with WooCommerce PDF Coupon Design – the need for branding

At some point, a client contacted us because they were using a plugin that generates WooCommerce PDF coupons. Although the visual editor was convenient, they had two specific requirements:

  1. First, change the default sans-serif fonts to serif fonts consistent with their branding.
  2. Second, increase the font size beyond the 72 px limit available in the editor.

Admittedly, the design looked sleek; however, the final PDF differed from the brand guidelines. Interestingly, the client chose two Google Fonts—PlayfairDisplaySC-Regular and League Spartan. Consequently, we proposed a customization that leverages the plugin’s built-in filters, because these filters give full control over coupon styling.

How to customize WooCommerce PDF coupons to fit your brand?

To meet the client’s needs, we implemented two key improvements. As a result, the PDF coupon design was perfectly aligned with the brand’s visual identity. Moreover, the entire change was completed with native tools shipped inside the plugin.

1. Adding a new font to the PDF coupon editor

The first step was to add a custom font to the list of fonts inside the drag-and-drop editor:

add_filter( 'fcpdf/core/editor/fonts', function( $fonts ) {
    $fonts['chango'] = [
        'name' => 'Chango',
        'url'  => 'https://fonts.googleapis.com/css2?family=Chango&display=swap',
    ];
    return $fonts;
});

You can easily replace Chango with PlayfairDisplaySC or any other Google Font, thus making the process extremely flexible.

2. Integrating the font with the WooCommerce PDF coupon generator (MPDF)

Next, we configured full font support in the PDF generator so that the selected font is embedded in every coupon:

add_filter( 'fcpdf/core/fonts/dir', function ( $dirs ) {
    $upload_dir = wp_upload_dir();
    $font_dir   = trailingslashit( $upload_dir['basedir'] ) . 'fonts';
    $dirs[]     = $font_dir;
    return $dirs;
} );
add_filter( 'fcpdf/core/fonts/data', function ( $fonts ) {
    $fonts['chango'] = [
        'R'  => 'Chango-Regular.ttf',
        'I'  => 'Chango-Regular.ttf',
        'B'  => 'Chango-Regular.ttf',
        'BI' => 'Chango-Regular.ttf',
    ];
    return $fonts;
});

🛈 Upload the required .ttf files to wp-content/uploads/fonts/, so the PDF engine can use them instantly.

WooCommerce PDF coupons adding filters

Result: visually consistent and on-brand WooCommerce PDF coupons

Because of this customization, the client received a fully branded document. They confirmed that:

  • The new font appears in the coupon template editor,
  • The generated PDF uses the custom font without issues,
  • The final look matches their design guidelines.

Even though the MPDF library currently limits font size to 72 px, the end result still met all expectations and looked highly professional.

Why bother customizing WooCommerce PDF coupons?

The Flexible PDF Coupons PRO plugin offers powerful features that let your store stand out. Moreover, you can produce documents that perfectly reflect your brand and impress customers with attention to detail. Consequently, perceived value increases.

Here’s what you specifically gain:

  • Drag-and-drop coupon editor,
  • Automatic integration with WooCommerce orders,
  • Option to add any Google Font or custom font,
  • Customization of text colour and size,
  • Flexible PHP filters for advanced scenarios.

📚 Technical documentation:
👉 Flexible PDF Coupons PRO – Documentation

🧪 Try the editor live:
👉 WooCommerce PDF Coupon Editor Demo

💬 Need help?
👉 Contact Flexible Coupons Support

Conclusion

This case clearly demonstrates that WooCommerce PDF coupons can be adapted to the most demanding branding standards. Thanks to the plugin’s flexibility and robust filters, even uncommon requirements—such as embedding brand-specific fonts—can be implemented quickly and effectively.

Ready to achieve a similar result? Then try Flexible PDF Coupons PRO in your WooCommerce store and gain complete control over how your coupons look.

Flexible PDF Coupons PRO WooCommerce £59

Design your own PDF coupons and sell them as gift cards, tickets, or service vouchers. Use extra add-ons and insert your own shortcodes, delay sending coupons by email, or even generate QR codes.

Add to cart or View Details
WP Desk
2,000+ Active Installations
Last Updated: 2026-09-02
Works with WooCommerce 10.7 - 11.1

About Krzysztof Skorupa

Technical Support Specialist at WP Desk, expert in WooCommerce and WordPress plugins. He documents features, supports users, and collaborates on plugin improvements.

  • Terms & Conditions
  • Privacy Policy
  • Support Policy
  • Refund Policy

© 2026 WP Desk WP Desk & Flexible Coupons

Manage Consent

We use necessary cookies to make our site work. We'd also like to set additional cookies to understand site usage, enhance your browsing experience, and serve personalized ads or content. By clicking ‘Accept All,’ you consent to our use of additional cookies.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}