I am trying to apply custom fonts on order confirmation notification template but for some reason its not working.I am using Google fonts through import css property
Alright, now this is a fix for everyone trying to use Google Fonts as a “custom font on shopify email notification template”.
Changing the font is actually quite simple:
Go to Settings → Notifications and select the Email-Event, you want to change the font for. This will open an HTML view like this:
Locate the -tag inside the -tag as marked in the screenshot.
Now changing your font is as simple as adding a new line straight after the opening -tag:
* { font-family: 'TheFontsName', sans-serif; }
This will already work for CSS Web Safe Fonts ( Check them out at W3C ). Try your luck testing them with the “Preview”-Button in the top-right corner of your Shopify-Admin-Panel after you inserted your rule.
As for custom fonts (Google Fonts in this case) we are now still missing the according font-face rules to make our font usable.
For clarification I want to add: “@import” and “” rules are not supported in Shopify Notification Emails.
To overcome this go to Google Fonts and select the font you want to use. I can recommend to select only 1 font-style once you have chosen your font, as otherwise you might end up loosing performance in email load time.
After selection of your font-style, you can use the button in the top-right corner to display needed CSS for import. It should look similiar to this:
You can now copy the url inside the import-rule and paste it to a new browser window. This will open up a site, with a couple of “@font-face”-rules.
As long as you want to display normal characters, you are most likely going to copy the snippet below the comment /* latin */.
Now paste the snippet straight after the opening -tag in the HTML of Step1 and before your rule of Step2 (don’t forget to specify the family name in the rule of Step2, if you haven’t already) . . .
Hi, this is working great! I know you recommend only adding one font style but I want to add a different font for the headers and body text. How would I customize the headers versus body text while uploading google fonts?