Some new websites that are using custom fonts on their sites (other than the regular Arial,Tahome).
Generically, you can use a custom font using @font-face in your CSS.
Here's a very basic example
Link for download good Font
fontsquirrel.com
Google Fonts
NOTE :
our font is cross-browser compatible, make sure that you use this syntax:
Generically, you can use a custom font using @font-face in your CSS.
Here's a very basic example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'YourFontName'; /*a name to be used later*/ | |
src: url('http://domain.com/fonts/font.ttf'); /*URL to font*/ | |
} | |
.classname { | |
font-family: 'YourFontName'; | |
} | |
/* (.classname is your selector in your project ). */ | |
/* ----------------- DEMO CODE *************** */ | |
@font-face { | |
font-family: 'openSans'; | |
src:url('../fonts/OpenSans-Regular_1.ttf'); } | |
@font-face { | |
font-family: 'openSansLight'; | |
src:url('../fonts/OpenSans-Light_1.ttf'); } | |
* | |
{ | |
margin:0px; | |
padding:0px; | |
} | |
body | |
{ | |
font-family:"openSans"; | |
color:#4f4f4f; | |
font-size:100%; | |
background-color:#F3f3f3; | |
} | |
h1{ | |
font-family:"openSansLight"; | |
color:#4f4f4f; | |
} |
Link for download good Font
fontsquirrel.com
Google Fonts
I hope that helped!
NOTE :
our font is cross-browser compatible, make sure that you use this syntax:
@font-face {
font-family: 'Comfortaa Regular';
src: url('Comfortaa.eot');
src: local('Comfortaa Regular'),
local('Comfortaa'),
url('Comfortaa.ttf') format('truetype'),
url('Comfortaa.svg#font') format('svg');
}