Hello there! Welcome to Youjoomla Support Forums

We are Web Development Company specializing in Joomla Templates , Joomla Extensions and WordPress Themes development . You are not able to see some forum threads due to your memberhip level. To unlock all forums and special customer support please take few moments to signup . If you are just searching for free joomla templates , or free joomla extension support simply head to our Free Joomla Support forums and open a new thread. Our moderators will help you as soon as possible. To spead up the response time please take few seconds and go over forum rules

Have fun!

Adding Google - font in YJSG Templates

10-13-2011, 08:18 AM
# 1 (permalink)
Skip2MyLou
Before any changes please BACKUP your current template!!!

1. Go to http://www.google.com/webfonts and choose the font that you need. Click "Add to Collection" and then click "Use" at the bottom of the screen.
Leave that screen open for the 2nd step.

2. Go to :

Your_root_folder\templates\your_template\yjsgcore and open yjsg_googlefonts.php

and add a new case for it:

PHP Code:

    case #:
    
$gapi_font_family "Your font family";
    
$gapi_font_param ="Your font param";
    break; 
*If your last case is 11 add a case 12.

To find your font family name and you font param go to the google page earlier open. And scroll down to this part :



The highlited part shows you your font family.



The highlited part shows you your font param.

3. Go to :

Your_root_folder\templates\your_template and open templateDetails.xml and find this code :

For joomla version 1.5 :

Code:

 		<param name="google_font_family" type="yjsglist" default="2" label="G_FONT_FAM_LABEL" description="G_FONT_FAM_DESC">
			<option value="1">Cardo</option>
			<option value="2">Cantarell</option>
			<option value="3">Lobster</option>
			<option value="4">Nobile</option>
			<option value="5">Droid Sans</option>
			<option value="6">Old+Standard+TT</option>
			<option value="7">Tangerine</option>
			<option value="8">Vollkorn</option>
			<option value="9">Yanone</option>
			<option value="10">Molengo</option>
			<option value="11">Crimson Text</option>
		</param>
For Joomla version 1.6 - 1.7 :

Code:

 		<field name="cufon_font_family" type="yjsglist" default="1" label="CU_FONT_FAM_LABEL" description="CU_FONT_FAM_DESC">
			<option value="1">Museo</option>
			<option value="2">Andika</option>
			<option value="3">CABND</option>
			<option value="4">Junction</option>
			<option value="5">League Gothic</option>
			<option value="6">Tallys</option>
			<option value="7">Chunk</option>
			<option value="8">Fertigo</option>
			<option value="9">Delicious</option>
			<option value="10">Molengo</option>
		</field>
and add a new line in the same manner <option value="case #">Your font name</option>

4. Go to your Administration > Extensions > Template Manager > Tab - Style Settings under
param "Use Element Tags font override" select "Yes" then under tab "Google Font-Family"
select your font and you're good to go.
01-15-2012, 11:29 PM
# 2 (permalink)
espacoautomotivo
Hey, Skip2MyLove!

Great tuto, congratulations! I was wondering if there is any tutorial on how to add more fonts to CSS.

For instance, I am using YouPlus and the defaul font used in the demo is a GoogleFont family (Yanone Kaffeesatz). So, everytime I refresh the site, it connects to Google (to load the font I think). Is there any way to add this font to CSS so it will come from my server and not from Google? If so, please, how to?

Actually, I tried to do the same procedure for CSS as described for Google Fonts, it works, but the local font is a bit different from Google (it's a little bit larger) and it does not support characters like , , , , , , etc (while Google Fonts does).

UPDATE: I've managed to add new fonts that comes from my server, thanks to arefund that made this tutorial: http://www.youjoomla.com/joomla_supp...1-5-1-6-a.html

Thank you.
01-16-2012, 10:36 AM
# 3 (permalink)
Skip2MyLou
Quote:
Originally Posted by espacoautomotivo
Hey, Skip2MyLove!

UPDATE: I've managed to add new fonts that comes from my server, thanks to arefund that made this tutorial (it needs some updates, by the way): http://www.youjoomla.com/joomla_supp...1-5-1-6-a.html

Thank you.
Yea, that was gonna be my proposal
Thread Tools
Display Modes

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

Members Login

Username
Password