logo-responsive
Welcome, Guest
Username: Password: Remember me

TOPIC: How to stop loading Google fonts from Google Servers in your template.

How to stop loading Google fonts from Google Servers in your template. 2 months 5 days ago #14520

  • JohnO
  • JohnO's Avatar
  • Offline
  • Administrator
  • Posts: 4809
  • Thank you received: 796
  • Karma: 93
How to stop loading google fonts from googles servers in your template.

STEP 1

OPEN THE FOLLOWING FILE - PHP/STYLES.PHP

A: Do a find for and remove
// remove websafe
$googlefonts = array_diff($googlefonts, $websafefonts);
// remove duplicates
$googlefonts = array_keys(array_flip($googlefonts));
// loop
foreach ($googlefonts as $v) {
    echo '<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family='.$v.':300,400" /> ';
}


B: Do a find for any instance of this text.
fonts.googleapis.com
If you find it then remove the complete line of code its in. Example
<link href='fonts.googleapis.com/css?family=Lato:400,300,100,700,900' rel='stylesheet' type='text/css'>


STEP 2


To remove them from being listed in the styling parameters do the following.
OPEN THE FOLLOWING FILE - ELEMENTS/GOOGLEFONTS.PHP

Do a find for
$googleFonts['Arial'] = '----------Google Fonts----------';

and remove it along with all the fonts listed below it in the array.
When you have this completed you will need to go into the template styling parameters >> Global Template Styling and select the websafe fonts you wish to use from the list and save.

You may also be interested in reading the following Tutorial - How to download and add a google font locally in my Joomla website >>

Thanks,
JohnO
Last Edit: 2 months 5 days ago by JohnO.
The topic has been locked.
Time to create page: 0.110 seconds
Powered by Kunena Forum

Use code   AUG18 at checkout

     August    

10% off Everything!