Drupal Technical
[Drupal] How to add a custom font style in your drupal website
In a drupal website, it is easy to add the font styles provided by drupal itself. If the user wants to add a font which is not present in the drupal site by default, the process given below can be followed. Read on to know more.
- Download the desired font from the net.
- Paste the downloaded file inside the site->Default->files
- There is a property in css called @font-face to add the font style which has been downloaded.
The following code explains how to add a font family with the help of css.
@font-face {
font-family: myFirstFont;
src: url('file location/filename.ttf'),
url('file location/filename.eot'); /* IE9 */
}
However, the Internet explorer only supports .eot type of extensions files. We need to specify that also.This way, we can add whatever font style is required.