Hi
Could you tell me how to embed google font to Joomla 3.0?
How to embed google font to joomla 3.0
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sat Apr 23, 2011 8:08 am
- ionut
- Joomla! Ace
- Posts: 1264
- Joined: Thu May 27, 2010 1:00 pm
- Location: EU
Re: How to embed google font to joomla 3.0
You could add the link provided by Google directly into your template if you want to use the font all over your website.
For example if you are using protostar template, go to Extensions - Template manager - click on the name of the template, in our case protostar (under the "Template" column, not "Style" ), and Edit Main Page template.
You can add the code ( <link href='http://fonts.googleapis.com/css?family=xxxxx' rel='stylesheet' type='text/css'> ) right above </head> tag. Save and that's all.
I've made a little video to show you how to do it: http://www.[youtube].com/watch?v=ae2cb_Uab_o
For example if you are using protostar template, go to Extensions - Template manager - click on the name of the template, in our case protostar (under the "Template" column, not "Style" ), and Edit Main Page template.
You can add the code ( <link href='http://fonts.googleapis.com/css?family=xxxxx' rel='stylesheet' type='text/css'> ) right above </head> tag. Save and that's all.
I've made a little video to show you how to do it: http://www.[youtube].com/watch?v=ae2cb_Uab_o
-
- Joomla! Apprentice
- Posts: 44
- Joined: Sat Dec 15, 2012 12:23 pm
Re: How to embed google font to joomla 3.0
It seems that there is some parameter built-in already (Joomla 3.0.3), see index.php of Protostar:
But where can I set this parameter?
Code: Select all
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<jdoc:include type="head" />
<?php
// Use of Google Font
if ($this->params->get('googleFont'))
{
?>
<link href='http://fonts.googleapis.com/css?family=<?php echo $this->params->get('googleFontName');?>' rel='stylesheet' type='text/css' />
<style type="text/css">
h1,h2,h3,h4,h5,h6,.site-title{
font-family: '<?php echo str_replace('+', ' ', $this->params->get('googleFontName'));?>', sans-serif;
}
</style>
<?php
}
?>
- Webdongle
- Joomla! Master
- Posts: 44096
- Joined: Sat Apr 05, 2008 9:58 pm
Re: How to embed google font to joomla 3.0
There is an option in the Template style options to use one Google font for headings. But if you want to create css that has reference to a different Google font than the main one you use ... then the method suggested by ionut[beesto] should work.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 44
- Joined: Sat Dec 15, 2012 12:23 pm
Re: How to embed google font to joomla 3.0
Aha, understood.
-
- Joomla! Apprentice
- Posts: 15
- Joined: Fri May 17, 2013 12:06 pm
Re: How to embed google font to joomla 3.0
Is it also possible to embed a google font for seperate menu sections, like the menu title and the headings of articles in a blog and the modules?
I want to integrate this font: font-family: 'Dawning of a New Day', cursive;
<link href='http://fonts.googleapis.com/css?family= ... +a+New+Day' rel='stylesheet' type='text/css'>
I want to integrate this font: font-family: 'Dawning of a New Day', cursive;
<link href='http://fonts.googleapis.com/css?family= ... +a+New+Day' rel='stylesheet' type='text/css'>
-
- Joomla! Apprentice
- Posts: 28
- Joined: Fri Feb 25, 2011 1:13 am
Re: How to embed google font to joomla 3.0
Hi,
Some days ago I had a similar issue: how to use google font for body tag.
Protostar Template has only a field to set the heading tags (h1, h2, h3...).
I solved myself and I wrote an article, let me share it with the community.
I hope someone will save time with it.
http://www.byman.it/x/protostar-font
ciao
- have fun -
Some days ago I had a similar issue: how to use google font for body tag.
Protostar Template has only a field to set the heading tags (h1, h2, h3...).
I solved myself and I wrote an article, let me share it with the community.
I hope someone will save time with it.
http://www.byman.it/x/protostar-font
ciao
- have fun -
-
- I've been banned!
- Posts: 27
- Joined: Sat Apr 13, 2013 5:49 am
Re: How to embed google font to joomla 3.0
Is there any way to embed a Google Web Font script in an SVG file?