Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using custom font in email html template

I am trying to use custom font in my Email template, but it seems webmails like gmail remove style tag in email body. Is there any way to load a custom font in email body? Like file URL or base64 encoded data URI?

like image 458
weera Avatar asked Apr 20 '26 19:04

weera


1 Answers

Custom fonts using @font-face only have limited support on email (no support for Gmail). https://www.caniemail.com/features/css-at-font-face/

The only way around it is to save it as an image. Having said that, many people do use images extensively for that reason.

If you do use an image for writing make sure you:

  1. Use a font-size large enough to be read on the mobile rendition (which will often reduce it to half size)
  2. Use the 'alt' attribute to write the text out for screen readers, smart watches & other smart devices that use a plain text rendition of your email
  3. Test it on a few different email clients
  4. Do not over-do it. Low quality (and spammy) emails tend to be image-heavy, and you don't want to get that sort of reputation.
like image 112
Nathan Avatar answered Apr 23 '26 15:04

Nathan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!