Answered
I have a custom font file (.ttf, .otf, .woff) I would like to use online. How do I use CSS to link to my custom file and incorporate the style within my page?
- Sellercore asked 10 years ago
- You must login to post comments
Best Answer
Assuming your font file is stored online so your viewers browser can link to it, you will want to use CSS @font-face in style brackets. The custom font-family name can be changed to whatever you like.
This is slightly more advanced coding but can be easily acomplished by copying the code below…
<style>
@font-face {
font-family: utsaah;
src: url(http://www.sellercore.com/classes/fonts/utsaah.ttf);
}
</style>
<span style="font-family: utsaah;">Example of linking a custom font!</span>
- Sellercore answered 10 years ago
- last edited 10 years ago
- You must login to post comments
Your Answer
Please login first to submit.