Found the font you absolutely must have at Google Fonts but it’s not in WOO Canvas?
Google Fonts at this writing has 629 fonts to choose from. I don’t know exactly how WOO Framework does it, but they don’t have all of them and it doesn’t seem like they automatically add them. In fact, I was just looking for some answers to this topic in the WOO forums and it looks like they have to add them manually. Bummer.
Want to just add one or two new fonts?
If you just need one or two fonts that Google has but WOO Canvas doesn’t, there’s a bit of code you can add to get them in there. Here’s the code you need. You’ll want to add it to your functions.php file.
1
2
3
4
5
6
7
8
9
|
// add the function to the init hook
add_action( 'init', 'woo_add_googlefonts', 20 );
// add a font to the $google_fonts variable
function woo_add_googlefonts () {
global $google_fonts;
$google_fonts[] = array( 'name' => 'Lustria', 'variant' => ':r,b,i,bi');
//$google_fonts[] = array( 'name' => 'Font Name', 'variant' => ':r,b,i,bi');
}
|
Looking to add all of them and have them (more) automatically available?
Jason Judge created a plugin for this exact purpose–guess he wasn’t the only one who wanted access to all of the Google Fonts available. Check out Google Webfonts For Woo Framework. He says you don’t necessarily have to do the Google API thing because when he periodically updates the plugin he’ll also update the fonts. Thanks Jason!
Thanks for the great video Bradley. Glad you find the plugin useful. It was one of those things – as it tends to be – where I needed the additional fonts for my own sites, so created the plugin, and then it took on a life of its own.
The number of fonts are up to 657 now, and I have updated the plugin (v1.3.3) to serve all those without an API key.
I’m thinking also about being able to push fonts served by other services into WooThemes themes. Technically it looks very feasible, but just need to find that scarcest of things, time…
I wish I knew how to build a plugin when I needed something! Great job. It really fills a void. I don’t know how this stuff work behind the scenes, but I wonder why WOO Canvas core can’t just update the fonts as Google adds new ones. Well, sounds like you’ve achieved that for them–or us.
Time? I have none of that. If you find some lying around, please send me some. 😉