How to Add Google Fonts to Joomla Template

google fonts joomla

The Google Fonts directory is one of the most exciting developments in web typography to come about it recent time. Google Fonts allows us as blog developers and users to use exotic eye catching fonts in our Joomla Templates. Previously it has been possible to use a handful of bold exotic fonts in our themes but it required tonnes of JavaScript code which put a heavy burden on our bandwidth and page loading times. The new service offered by Google Fonts has come along and saved us once again.

How to manually add Google Fonts to our Joomla Templates

In the first part of the article I am going to show to manually ad the code ( Cascading Style Sheet references and CSS styles ) to your Joomla Templates.

1, First of all visit the Google Fonts Directory and find the font you are interested in using.
2, Once you have found the font you want to use click on the link to the right of the font that states: Quick-use. This will expand the selection of the font and display the code you will need to add to your theme.
3, Scroll down the page until you can see the Cascading Style Sheet (CSS) reference that you need to use. It will look like this:
{jb_greenbox}<link href='http://fonts.googleapis.com/css?family=Gentium+Basic' rel='stylesheet' type='text/css'>{/jb_greenbox}
4, Navigate to your current theme directory.
5, Find the file index.php and open it in your html editor
6, In the index.php file navigate to the part of the file where your theme CSS file is included. Below the theme CSS file reference add the new Google Fonts css reference. Your code should look similar to this:
{jb_greenbox}<link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link href=‘http://fonts.googleapis.com/css?family=Gentium+Basic’ rel=‘stylesheet’ type=‘text/css’>{/jb_greenbox}
7, Almost done. Our final step now is to determine which HTML element we want to allocate our Google Fonts to. For example you might want to allocate the new Google Font to the h1 element. To do this open up your theme css document in your html element. Normally style.css.
8, Lets say you want to use the new font with the h1 element. Create a new css rule and add this code to the bottom of the style.css file:
{jb_greenbox}h1 {
font-family: ‘Gentium Basic’, serif;
}{/jb_greenbox}
9, That’s it! Complete. Now you just need to upload the modified files to your web host for the changes to take effect.

Using Joomla Plugin to add Google Fonts to our Template:

The great thing about using Joomla as there are nearly always plugins available for any task you want to achieve. If you are not comfortable or confident you can always download and install one of the available plugins to add the Google Fonts code for you.

HD-Gfonts (Compatibility Joomla 1.5 -1.7 - 2.5)
HD-Gfonts is a simple plugin that allows you to replace the standard fonts of your headings with a wider range of fonts from the Google Font Directory. There are currently over 250 fonts

 
SPONSOR RECOGNITION

Search Box

Latest Resources

media-company-logo-vector-4 Series of famous media company logo vector part 4, the image is everything then your company's logo is...
media-company-logo-vector-3 Series of famous media company logo vector part 3, the image is everything then your company's logo is...
media-company-logo-vector-2 Series of famous media company logo vector part 2, the image is everything then your company's logo is...
media-company-logo-vector-2 Series of famous media company logo vector part 2, the image is everything then your company's logo is...
media-company-logo-vector-1 Series of famous media company logo vector part 1, the image is everything then your company's...
hall-scene-psd Home and workspace hall scene with psd file, the scene contains bulletin board, photoboard pin...
caroufredsel CarouFredSel is a free circular, responsive jQuery carousel that turns any kind of HTML element into a...
scrolls-image-gallery This is a PHP and jQuery image gallery developed by tympanus called Fresh Sliding Thumbnails...
jquery-circular-plugins There is many great jQuery circular plugin that help you to create beautiful circular switches like volume...
joomla-admin-tool A professional admin tool like wordpress admin panel for joomla 2.5+ called JSN PowerAdmin developed by...

About & Suggest

joomlavisually.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries. If you want to avail this great opportunity to write for us, please contact at joomlavisually[@]gmail.com.
Copyright © 2008 - 2012 Design by Joomla Visually, All Rights Reserved.