Present I see lot of web sites use true type fonts. I want to to know how to use true type fonts in our applications and does it affect the load time of the pages ?
-
You also might want to add EOF fonts for Windoze support: http://stackoverflow.com/questions/6437061/convert-arabic-ttf-otf-fonts-to-woff-eof – Raydot Jul 16 '14 at 16:33
4 Answers
HTML5 allows to use TTF fonts in your CSS:
@font-face {
font-family: 'Tagesschrift';
src: url('tagesschrift.ttf');
}
To use it:
h1, h2, h3 { font-family: 'Tagesschrift', 'Georgia', serif; }

- 36,125
- 23
- 149
- 210
-
-
4
-
5@AliGajani https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face#Browser_compatibility – kevin May 12 '14 at 08:02
-
2It was fontsquirrel that fixed the issue for me, from the link posted above. Thanks! I recommend people try fontsquirrel. – Marcel Marino Jun 07 '15 at 19:12
I want to update the accepted answer due to a significant passage of time. The following is what Font Squirrel outputs under their recommended 'Optimal' setting. Supporting .ttf
at this point is no longer important and should be ignored.
font-family: 'Tagesschrift';
src: url('tagesschrift.woff2') format('woff2'),
url('tagesschrift.woff') format('woff');
font-weight: normal;
font-style: normal;

- 18,436
- 4
- 42
- 61
-
This is a good service if you only need English fonts, it cuts fonts in other languages. Just keep in mind – AC1D Mar 19 '21 at 14:31
You use Font Embedding.
It will affect the overall load time of the page as the font data has to be downloaded as well as the other content, styles etc. However, it will be cached so only impacts on the first view of the page.

- 134,786
- 31
- 255
- 325
Font embedding can be a bit complicated due to browser compatibility issues. For example, Safari only supports SVG fonts. IE only supports .eot, which must first be converted from .ttf
I have found the easiest way to use custom fonts is with Google Fonts Besides having the free google font directory to choose from, there are a few providers that provide a much wider selection of fonts for free and to purchase.

- 1
- 1

- 1,307
- 2
- 16
- 23
-
7
-
7This answer is 8 years outdated and was a good answer back then. For modern browsers I'd recommend HTML5 TTF in css. – James Reategui Apr 05 '18 at 18:45