0
Welcome Guest! Login
0 items Join Now

SOLVED Where are the missing Google fonts?

    • oerb's Avatar
    • oerb
    • Jr. Rocketeer
    • Posts: 33
    • Thanks: 0

    SOLVED Where are the missing Google fonts?

    Posted 13 years 1 month ago
    • MODERATOR EDIT: New info here: www.gantry-framework.org/documentation/j...rials/custom_font.md

      Old tutorial below:



      Somehow I must be missing something. I have looked throughout this forum, but I have not seen anything on how to add the missing Google fonts.

      When I turn the "Google Font Directory" to the "on" position in a Gantry template (I have tried this in more than one RocketTheme Gantry template) and then click the "save" button, I can see that the "Google Font Directory" option becomes active, but there are SEVERAL fonts missing off of the list as compared to the ones listed in the actual "Google Font Directory" which can be found here:

      www.google.com/webfonts

      The font I am trying to use is "Calligraffitti". Has anyone else out there run into this, and have a solution.

      Any help would be greatly appreciated.
    • Last Edit: 9 years 8 months ago by Matt.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Where are the missing Google fonts?

    Posted 13 years 1 month ago
    • Perhaps this helps:
      (J!1.5)

      How to add the missing Google fonts ...

      Example for 'Rock Salt'

      1. copy the file
      Joomla-Root/components/com_gantry/features/webfonts.php
      into the feature folder of your template
      Joomla-Root/templates/rt_hybrid_j15/features

      2. open this new file and change
      var $_google_fonts = array('Cantarell','Cardo','Crimson Text','Droid Sans','Droid Sans Mono','Droid Serif', 'IM Fell English', 'Inconsolata','Josefin Sans Std Light','Lobster','Molengo','Nobile','OFL Sorts Mill Goudy TT','Old Standard TT','Reenie Beanie','Tangerine','Vollkorn','Yanone Kaffeesatz');

      to

      var $_google_fonts = array('Cantarell','Cardo','Crimson Text','Droid Sans','Droid Sans Mono','Droid Serif', 'IM Fell English','Inconsolata','Josefin Sans Std Light','Lobster','Molengo','Nobile','OFL Sorts Mill Goudy TT','Old Standard TT','Reenie Beanie','Tangerine','Vollkorn','Yanone Kaffeesatz','Rock Salt');

      3. copy this file
      Joomla-Root/components/com_gantry/admin/elements/fonts.php
      into this loaction
      Joomla-Root/templates/rt_hybrid_j15/admin/elements/fonts.php
      (Probably you have to create the folder "elements")

      4. open this file and change
      var $_google_fonts = array('Cantarell','Cardo','Crimson','Droid Sans','Droid Sans Mono','Droid Serif', 'IM Fell','Inconsolata','Josefin Sans Std Light','Lobster','Molengo','Nobile','OFL Sorts Mill Goudy TT','OFL Standard TT','Reenie Beanie','Tangerine','Vollkorn','Yanone Kaffeesatz');

      to

      var $_google_fonts = array('Cantarell','Cardo','Crimson','Droid Sans','Droid Sans Mono','Droid Serif', 'IM Fell','Inconsolata','Josefin Sans Std Light','Lobster','Molengo','Nobile','OFL Sorts Mill Goudy TT','OFL Standard TT','Reenie Beanie','Tangerine','Vollkorn','Yanone Kaffeesatz','Rock Salt');

      Probably it's a good idea to clear joomla- and gantry-caches ...
      Now you should get the option to choose the new google font "Rock Salt" from the drop down in the gantry backend ...
    • oerb's Avatar
    • oerb
    • Jr. Rocketeer
    • Posts: 33
    • Thanks: 0

    Re: SOLVED Where are the missing Google fonts?

    Posted 13 years 1 month ago
    • Thanks Henning, your instructions were perfect and the new font showed up right after I cleared the joomla cache.

      I would have been lost if it weren't for the amazing support I find here.

      I suppose you can move this to the "SOLVED" thread.

      Thanks again :D !
  • Re: SOLVED Where are the missing Google fonts?

    Posted 12 years 10 months ago
    • Fixed it for me too!

      Now just have to work out how to get the main menu to comply.

      Many, many thanks.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: SOLVED Where are the missing Google fonts?

    Posted 12 years 2 months ago
    • Updated Instructions for Joomla 2.5
      Thanks to Henning, I've been using this post as a guide, along with others, to do this and there are some differences in version 2.5. I thought I would share them here, as others keep referencing this post as a source.

      For references to the codes, nothing has changed in that regard, Henning explains that well above. The path of the files, particularly the admin file, have changed and requires an additional edit to be made to the code of fonts.php.

      Files:
      Find: libraries/gantry/features -> webfonts.php
      Copy this file to your template -> features directory.

      Next find: libraries/gantry/admin/forms/fields -> fonts.php
      In your template directory admin folder, create a forms folder, then a fields folder inside that and place fonts.php inside the fields folder.

      Additional Step Required:
      fonts.php requires selectbox.php to run. Since we have moved the fonts.php file into our template directory, we need to change the path reference to selectbox.php so it points to the right file in the Gantry Core.
      Open the fonts.php from your template directory and find this code, line 12:
      require_once(dirname(__FILE__).'/selectbox.php');
      Change the code to this:
      require_once(JPATH_SITE . '/libraries/gantry/admin/forms/fields/selectbox.php');
      That should do it, hope that helps.
    • The difficult we do immediately, the impossible takes a little longer.

Time to create page: 0.054 seconds