As I was editing a Mailer template in core php, I found myself wanting to set a custom font for the text displayed in the mail template similar to how we do it for websites using CSS and imported fonts.
Below is the code snippet that I have been using:
<link href=\"https://fonts.googleapis.com/css?family=Cairo\" rel=\"stylesheet\">
<style type=\"text/css\">
body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
width: 100% !important;
margin: 0 !important;
height: 100%;
color: #676767;
font-family: 'Cairo', sans-serif !important;
}
<td class=\"header-lg\" style=\"font-family: 'Cairo', sans-serif !important; font-weight: 500;\">
Just One More Step To Go...
</td>
Despite implementing these changes, the demo mail still displays with the default font used by Gmail app, browser email, and other mail services. Can anyone provide suggestions on how to make it work?