Round Rock / Austin, Texas
Drupal Web Developer

How to Add Google Fonts to Drupal Theme

How to Add Google Fonts to Drupal Theme

Drupal themes are a little special in that you have to take special steps to add tags or code to the <head> tag of your html.  If you want to include a Google Font to your theme the most efficient way to do this is to add this code snippet to your theme's template.php file:

 

function yourthemename_preprocess_html(&$variables) {
   drupal_add_css('http://fonts.googleapis.com/css?family=Alegreya', array('group' => CSS_THEME));
}

Reference Link for more details: http://www.webomelette.com/drupal-google-web-fonts