Typography can make or break your email overall design and user experience. In today’s digital age, the way you import fonts can significantly impact both performance and aesthetics. even though some email providers doesn't support the use of custom font, it is a good practice to make use of it in your emails to enhance your email experience. In this post, we’ll break down the two most popular font import methods—using custom @font-face and the normal import method (via <link> tags or @import rules) — and help you decide which option is best for your email project.
Understanding the Two Methods
1. The Normal Import Method
The normal import method is perhaps the easiest way to get a stylish font on your email. This method typically involves either linking directly to a font library (like Google Fonts) using a <link> tag in your HTML or importing the font in your CSS using the @import rule. For example:
the above code shows how a google font by the name of Roboto is imported through the link tag which is suppose to be in the head section of your code.
This approach is widely used because it’s straightforward, requires minimal setup, and leverages the robust infrastructure of CDN providers. With millions of websites using the same fonts, browsers may even have the font cached, which speeds up load times.
2. custom @font-face
The custom @font-face method, on the other hand, allows you to self-host fonts. By uploading font files directly to your server and referencing them in your CSS, you gain complete control over how your fonts are delivered. An example looks like this:
This technique is a bit more involved than the normal import method, but it offers unique benefits that can be essential for certain projects.
Pros and Cons of Each
1. Normal Import Method
pros
Ease of Use: Implementing fonts is as simple as adding a few lines of code to your HTML or CSS.
CDN Benefits: Fonts served from popular providers like Google Fonts are often optimized for speed and reliability.
Caching: Since many sites use the same fonts, there’s a good chance that visitors already have them cached in their browsers. so if the users are viewing the emails on the browsers, its possible they have the fonts cached.
Maintenance-Free: Font providers handle updates, compatibility, and optimizations on their end.
cons
Limited Customization: You’re bound to the fonts and settings provided by the external service.
Privacy Concerns: Some businesses worry about third-party requests for fonts potentially exposing user data.
2. Custom @font-face
pros
Complete Control: You can choose exactly which font files to use, how they’re optimized, and when they load.
Performance Optimization: Self-hosting allows you to implement caching strategies tailored to your needs, potentially reducing load times.
Branding Consistency: Custom fonts can help reinforce brand identity by allowing you to use unique typography that isn’t available in public repositories.
cons
More Technical Setup: You have to host the font files yourself and ensure they are properly referenced.
Which Option Should You Use in HTML Emails?
when it comes to html emails, using the normal @import technique is Not the best choice, since many email clients won’t support the external link or @import code. some email service provider's(ESP) like klaviyo for example, when a custom editable code is imported removes all the @import fonts from the imported code. its a technique called "safing" in the email environment where-by all codes which are not widely supported in email clients is removed completely from the custom editable code.
however, @font-face is a better option than the normal import method for emails—but when used in the right way, because we have different file formats in this specification. for example we have the TTF file format, the WOFF,WOFF2, OTF, and so-on. but sticking to the WOFF or WOFF2 font format in emails is the best practice because the font is optimized in this format. however, custom fonts doesn't usually comes with the WOFF file format, so in this case you might need to convert the font into a WOFF or WOFF2 format using any online font file converter. the best one I prefer to use is the transfonter.org when converting My font file to another format.
Since using a custom fonts is not 100% reliable in emails, one must always add a fallback fonts (like Arial or Helvetica) to ensure a consistent experience. and always remember the limitations of HTML email clients. Balancing design with reliability is key, so choose the method that best fits your needs and always test your emails across different platforms
my email templates are compatible with Klaviyo, Mailchimp, Campaign Monitor + 28 Email Service Providers. Simply integrate my email template to your preferred Email Service Provider.