I am creating visualforce email template and need to use custom fonts (mostly Neutraface Display, SalesforceSans, TrailheadBold2). Most of the search results i get are about using them in visualforce page or visualforce components (that get used in VF pages) or HTML template, where you can upload fonts in static resource and then use them as follows -

    font-family: 'MyCustomFont'; 
    src: url(/resource/MyCustomFont);

But we can't reference static resources in visualforce email templates. So not sure how to go about it. I am using visualforce components in my templates, but cant reference static resources in there as theya re part of email template, not a VF page

In my company's internal forumn, someone gave this solution -

@font-face {
src:url('http://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Bold.eot?#iefix') format('embedded-opentype'),
url('http://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Bold.woff') format('woff'),
url('http://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Bold.woff2') format('woff2'),
url('http://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Bold.ttf') format('truetype'),
url('http://c1.sfdcstatic.com/etc/clientlibs/sfdc-aem-master/clientlibs_base/fonts/SalesforceSans-Bold.svg#SalesforceSansBold') format('svg');font-weight:normal;font-style:normal

<p style="font-family:SalesforceSans-Bold">Hello World</p>

But then i never received responses on where are we getting those URLs from.

If there is someone who has used custom fonts in visualforce templates, please let me know what can be done here


You must log in to answer this question.

Browse other questions tagged .