Give the WooThemes framework access to the full range of current Google Webfonts.
The purpose of this plugin is to make all available Google webfonts available to the WooThemes Canvas theme,
and any other themes that use the WooThemes framework. It also allows additional selected international subsets
(Greek, Cyrillic, Vietnamese etc.) to loaded, which the Woo Framework does not support at present.
It works like this:
What you should then see, is the ability to select any available Google web font in the WooThemes theme administration pages,
and have those fonts displayed in your theme.
In previous versions, you had to register for a Google API key. You no longer have to do this, as the plugin
has a shared API key built-in. You can still use your own, but if you don’t, then the shared key will be
set when activating the plugin.
If an invalid API key is used, this plugin has a fallback list of fonts, so you can try it out without an API key,
and that might even be good enough for your purposes.
In addition, you can select the weights that will be downloaded. If you only use light/regular/bold (300/400/700) then
there is no point requesting all the additional weights from some of the fonts that are more complete, but
consequently are a very heavy download. This plugin will help to keep the bandwidth down, and so the load speed higher.
This plugin has been tested against PHP5.3 and the project repository is here:
https://github.com/academe/google-webfonts-for-woo-framework/
Changes have been made so that it works with PHP5.2 and has been reported as working.
However, I work under at least 5.3 so some incompatibilities may creep in by accident from time-to-time – just report them and I will do my best to fix as quickly as possible.
Please let me know how this plugin works for you, whether you like it, and how it can be improved.
/wp-content/plugins/
directory or google-fonts-for-woo-framework.zip through the “Add Plugins” administration page./wp-content/plugins/
directory or google-fonts-for-woo-framework.zip through the “Add Plugins” administration page.This plugin is managed on github here https://github.com/academe/google-webfonts-for-woo-framework
Feel free to raise issues there and make pull requests, as well as in the normal way on wordpress.org
Some hosts may not be set up to allow your site to fetch data from remote sites. Please report any
such errors on the plugin page or github, and we will try looking for a workaround.
Yes, you can. WooThemes themes provides a short-code tag that allows you to embed any font in the body of a page or post.
However, the list of fonts that the short-code quick-create function that the content editor provides, will not
include the full list of fonts. To work around this, just select any random font to create a short-code tag,
then change the name of the font manually in that tag. The theme will load that font automatically when you display
the page or post.
Many Google Webfonts come with variants, and these are listed against each font in the plugin settings page.
A variant is another version font from the same font family, that is used for displaying a different style
or weight. Where a variant does not exist, for example if there is no “italic” variant, the web browser will
fake it and make a best guess of what it would look like. This is not ideal from a design perspective.
So where possible, use fonts that have variants listed that cover the styles and weights that you want to use
in your design. That way you will get a font that has been carefully designed for that purpose.
The settings page allows you to preview specific variants of each font, as well as the standard core font
(generally normal/non-italic, and regular/400-weight).
For now, yes it is. The Woo Framework is designed to pull in external webfonts from Google only at present.
There are plans to extend this to other sources of web-based fonts, with the risk that it may be a little
ess robust when it comes to theme updates from WooThemes. However, that will likely be a separate plugin;
this plugin will continue to support just Google Webfonts.
If you do not supply a valid API key, this plugin will fall back to the fonts listed in fonts.json
To get an updated list of fonts for that file, make sure you have a valid API key then add this
parameter to the end of the settings page for this plugin:
export=1
Your URL will look like this:
http://yoursite.example.com/wp-admin/options-general.php?page=gw-for-wooframework&export=1
This will then list all the fonts and their variants downloaded from the Google API in the same
format that fonts.json uses. There is no API at this time for fetching the subsets (latin, greek etc) or font
classes (serif, sans serif, handwriting, etc), so that information is not included. However, if you are
interested in those details, I’m trying to keep an updated list here:
https://github.com/academe/GoogleFontMetadata
In the settings page, you can select a filter for the font weights. By selecting weights, only those weights
will be requested from Google.
What happens, is that when you request a font from Google, it is delivered with all the weights that it
supports. Those weights may include ultra-bold, ultra-light, semi-bold and so on, as well as the standard
light/normal/bold (also known as 300, 400 and 700). Each of these weights adds to the download payload
and that can be excessive for some fonts, especially for users on slow or expensive connections.
By filtering the weights – by default just asking for 300/400/700 – the fonts downloaded from Google can
be much smaller. WooThemes themes only support these three weights in the theme administration pages, so
this is why we only request these three by default. If you have extended the theme and require additional
weights, then select the weights that you would like included in the settings page. Those weights will
then be requested for all all fonts used from Google, but only where Google offers those weights.
Selecting a weight, or not selecting it, will not change the weights your browser will attempt to display.
What it changes is the glyphs for the exact weights that are requested from Google. It is a performance
enhancement; don’t download what is not needed.
You can reset the key by blanking it out on the settings page. By deactivating and reactivating the plugin,
the default shared key will be added back in.