Font face

CSS: Use Your Desktop Fonts on Your Website

“How to use .OTF (or other desktop) fonts on your website?”

If you would like to use your desktop fonts on your website, do this!

CSS

  1. Select your fonts and place them on your server.
  2. Copy and paste the code below into your stylesheet.
  3. Replace 'FONT1' in font-family on both @font-face and p with your own font name.
  4. You may change normal to bold if necessary.
@font-face {
	font-family: 'FONT1';
	src: url("../fonts/YOUR-FONT-LOCATION.otf") format("opentype");
	font-weight: normal;
	font-style: normal;
}
p { 
	font-family: 'FONT1', sans-serif; 
}

Leave a Comment

Your email address will not be published. Required fields are marked *