Look at the difference between these two 50px headers that use the Georgia font:
The top one is from IE8 on Windows Vista, whereas the bottom one is from Firefox 3.0.15 on Ubuntu 9.04. On Windows, the text is clearly less pleasant on the eye? It is has jagged edges, has a pixel or two cut off the end of the ‘s’ and is 17 pixels less wide.
This is the styling code:
#logo h1 {
font-family:Georgia, Arial, sans-serif;
font-size:50px;
font-weight:normal;
letter-spacing:-0.05em;
line-height:normal;
}
In this tutorial we are going to create a very basic “blank canvas” webpage which has a central white cut-out with a drop shadow effect. Our “page” will be 960px wide, floated in the center of the browser window:
If you want to use the “Purisa Light” font on your Linux hosted website, you can follow the following steps:
@font-face {
font-family: 'Purisa';
src: url('fonts/Purisa.eot'); /* For IE */
src: local('Purisa'),
url('fonts/Purisa.ttf') format('truetype');
}
<div style="font-family:Purisa,arial"> This should be in the "Purisa Light" font... </div>
cd ~/ttf2eot-0.0.2-2 sudo apt-get install build-essential make
@font-face is a HTML5 feature supported by Safari 3.1+, Firefox 3.5+, Opera 10+ and IE 4+. At the time of writing Google Chrome currently doesn’t support @font-face (but the beta version does so it won’t be long).
This post was inspired from an excellent article called @font-face in Depth.