Skip to content

Instantly share code, notes, and snippets.

@srujan21
Created February 9, 2017 11:09
Show Gist options
  • Save srujan21/20c9636ab63f08f0eebedafac383090b to your computer and use it in GitHub Desktop.
Save srujan21/20c9636ab63f08f0eebedafac383090b to your computer and use it in GitHub Desktop.
Code to import fonts
@font-face {
font-family: myFont;
src: url({!URLFOR($Resource.MyZipFile, '/root/to/font.ttf')});
}
p {
font-family: myFont;
}
//You could put them in a .zip folder, upload them as a static resource and use @font-face to call them in your CSS.
//In @font-face you're created a font giving it a name and the directory to your font. Then in p you're simply using the font you've referenced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment