http://drupal.org/project/google_fonts

We should move to @font-your-face. We moved to this module for other projects months back.

Does anyone know what would be involved?

Doesn't look like Google Fonts even has a default configuration. Perhaps we ditch it?

Comments

dude4linux’s picture

This worked until a few days ago. Apparently the Google Fonts module stopped supplying a recommended and supported version, so drush make no longer installs the module. I tried installing @font-your-face and saw no apparent issues. I'm installing using the following stub make file:

api = 2.x
core = 7.x
projects[] = drupal

projects[openchurch][download][type] = "git"
projects[openchurch][download][profile] = "contributions/profiles/openchurch"
projects[openchurch][download][revision] = "7.x-1.x"

drush make completes successfully, but the following drush site-install fails:

Starting Drupal installation. This takes a few seconds ...                                                                                   [ok]
WD php: Exception: Required modules: Required modules not found.                                                                             [error]

The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as sites/all/modules.
Missing modules: Google_fonts in install_verify_requirements() (line 756 of /var/www/drupal7/includes/install.core.inc).
WD php: Warning: Cannot modify header information - headers already sent by (output started at /opt/drush/includes/output.inc:37) in         [warning]
drupal_send_headers() (line 1239 of /var/www/drupal7/includes/bootstrap.inc).
Exception: Required modules: Required modules not found.

The following modules are required but were not found. Move them into the appropriate modules subdirectory, such as <em>sites/all/modules</em>. Missing modules: <span class="admin-missing">Google_fonts</span> in install_verify_requirements() (line 756 of /var/www/drupal7/includes/install.core.inc).
Drush command terminated abnormally due to an unrecoverable error.                                                                           [error]
Fatal: Error: Drush site-install failed to complete
dude4linux’s picture

To replace google_fonts with @fontyourface, make the following changes:

In openchurch.make

replace
    projects[google_fonts][subdir] = contrib
with
    projects[fontyourface][subdir] = contrib
    projects[fontyourface][version] = 2.x

and in openchurch.info

replace
    dependencies[] = google_fonts
with
    dependencies[] = fontyourface
    dependencies[] = fontyourface_ui
    dependencies[] = google_fonts_api
drupalninja99’s picture

Thanks alot dude4linux! I will try to integrate this this weekend, I didn't realize the google_fonts module was unsupported.

drupalninja99’s picture

Is google_fonts_api a module or a library? I don't see a project for google_fonts_api

dude4linux’s picture

It's a sub-module of @fontyourface. Only one of several font sources that can be selected from the fontyourface_ui. I included it because we were replacing the google_fonts module.

drupalninja99’s picture

Status: Active » Needs work

Changing to needs work, will add to the roadmap ticket.

drupalninja99’s picture

Priority: Normal » Major

Changing priority

drupalninja99’s picture

Status: Needs work » Needs review

This is committed to head, if you to a .make build you can get the latest or wait for the packager to update the tarball.

I am going to do a build and test locally. It looks like a real easy switch based on my local test of just downloading and enabling the new module. Thanks!

drupalninja99’s picture

Had a typo in my .info, this is fixed in head now.

drupalninja99’s picture

Status: Needs review » Fixed

This was fixed in 1.9-alpha2

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

JulesJH’s picture

Status: Closed (fixed) » Needs review

Which package version should I be using? I have a problem with Google Fonts not being downloaded in openchurch-7.x-1.9-beta1-core.zip.

drupalninja99’s picture

It's been replaced with google fonts api and font your face which should work out of the box.

JulesJH’s picture

Hi drupalninja99,

It didn't work out the box for me. I got this message during install:

"The list of Google Fonts could not be fetched. Verify that your server can connect the Google Servers (https://www.googleapis.com). Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

By the way, this is a great distribution. By far the best in this area to date! Keep up the good work!

drupalninja99’s picture

Make sure you files directory is writable. Oh I wonder if you need php_curl enabled in your php.ini file. That might be what it is. If so you need to enable and restart apache

JulesJH’s picture

Hi again,

Yes, I made sure all folders and contents were writable before I installed it. However, I checked again just to make sure. Also curl is already enabled...

I note that the URL to google fonts in the error message shows "https" rather than "http", yet in this article it shows the same URL without the secure part: https://developers.google.com/webfonts/docs/getting_started.

Just trying to help out, so I may up a gum tree here...

Jules

drupalninja99’s picture

Status: Needs review » Needs work

ok darn i thought this was working, it appears it isnt.

drupalninja99’s picture

Well I saw it wasn't enabled on the demo site but that was upgraded from an earlier version. It seemed to download the google fonts just fine.

drupalninja99’s picture

It seems to work fine in dev 2x, I don't have any idea where fontyourface even installs fonts if at all. I know I dont get any errors.

JulesJH’s picture

Hi

As I can play with different versions locally, I downloaded openchurch-7.x-1.x-dev-core, and the same thing happened. I got the same error message. I think it is just timing out during the install.

However in admin/config/user-interface/fontyourface, I was able to download the fonts retrospectively, and install them at admin/appearance/fontyourface/browse/google_fonts_api. I haven't enabled any as yet.

I presume that your theme uses some of them? Can you tell me which ones so I can add them manually? There are over 1,500 of them, so I don't want to enable them all....

Jules

drupalninja99’s picture

I just use Neuton, I don't think you have to enable them? I thought you could just use them

drupalninja99’s picture

OK maybe I have the Neuton font on my local box and that's throwing me off.

drupalninja99’s picture

Good catch, I had to add a line to my info file for it to work. I tested in ie to make sure it worked. The problem was that I have the Neuton font on my local box.

This is now in 1x-dev and will get pushed out pretty quick.

drupalninja99’s picture

Actually its in the openchurch theme 1x dev, I need to fix something in another ticket before I can roll out everything to a stable release.

drupalninja99’s picture

For now you can hot fix it by just adding 'fonts[google_fonts_api][] = "Neuton&subset=latin#regular"' to your .info file in the openchurch_theme

drupalninja99’s picture

-Added release 1.9-beta2 which fixes this

drupalninja99’s picture

Status: Needs work » Needs review
JulesJH’s picture

Many thanks. Will check it out...

JulesJH’s picture

Hi drupalninja99,

Using 1.9-Beta-2: Can't import fonts at all now in: config/user-interface/fontyourface

Error messages AFTER running import say:
"The list of Google Fonts could not be fetched. Verify that your server can connect the Google Servers (https://www.googleapis.com). Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
The google_fonts_api font that is added to the theme .info file cannot be loaded. This is probably because the import has not been run yet. Run import to add fonts."...

JulesJH’s picture

I might add that even though both beta-2 and openchurch-7.x-1.x-dev-core won't import the fonts during install, in openchurch-7.x-1.x-dev-core I can at least use the google fonts import after the install, whereas in beta-2 it appears to be broken...

drupalninja99’s picture

I will test beta2 again locally. If you can't import fonts though that might be a permissions thing.

drupalninja99’s picture

Looks fine locally

sugens’s picture

Hi There,

I am having similar problems with Google fonts. Just installed openchurch-7.x-1.9-beta2-core and get a "Google Fonts" error notification at the top of each page saying that the error is likely because "Run Import" has not been complete. When I click the link to do the import, It takes me to Home » Administration » Configuration » User interface » @font-your-face settings and has a button to "Import Google Fonts" under the Provider section. When I click the button I get the following error:

- The google_fonts_api font that is added to the theme .info file cannot be loaded. This is probably becuase the import has not been run yet. Run import to add fonts.
- The list of Google Fonts could not be fetched. Verify that your server can connect the Google Servers (https://www.googleapis.com). Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?

By the way, https://www.googleapis.com retruns a 404 page not found error. The unsecure version (i.e. http://www.googleapis.com) also returns a "link appears to be broken" page and suggests http://www.­apis.­google.­com as an alternative. Clicking that link redirects you to http://code.google.com/.

Hope this helps

drupalninja99’s picture

You should review the google_fonts_api issue queue. I would suspect that you don't have ssl enabled in your php.ini. I don't think is a problem on the OpenChurch side of things.

drupalninja99’s picture

Status: Needs review » Fixed

This should be fix in versions greater than 1.10

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.