Jump to content
Sign in to follow this  
lunarstudio

Additional Google Web Fonts

Recommended Posts

lunarstudio

Is there a way to add additional Google Web Fonts to the pro version? If not, do you plan on allowing us to do so in the future?

Share this post


Link to post
Share on other sites
kastelic
Yes, there is even an example you can copy in functions.php: [code] // FILTERS EXAMPLE ---------// // The following filter will add the font Ubuntu into the font array $thefoundry. // This makes the font available to the framework and the user via the admin panel. //add_filter ( 'pagelines_foundry', 'my_google_font' ); function my_google_font( $thefoundry ) { $myfont = array( 'Ubuntu' => array( 'name' => 'Ubuntu', 'family' => '"Ubuntu", arial, serif', 'web_safe' => true, 'google' => true, 'monospace' => false ) ); return array_merge( $thefoundry, $myfont ); } [/code]

Share this post


Link to post
Share on other sites
lunarstudio
So if we wanted to add multiple fonts - let's say ALL of them, would I just repeat this or is something bad going to happen?

Share this post


Link to post
Share on other sites
klausk
i have the same question -- though I'm not sure where I am pasting this code. i keep getting errors if I modify /platformbase/functions.php

Share this post


Link to post
Share on other sites
Simon
Basically you would need to load each one into the array, but why in the world would you want all of them?

Share this post


Link to post
Share on other sites
lunarstudio
For convenience and to play around with how something looks.

Share this post


Link to post
Share on other sites
Rob
Pross was trying, I think, to make the point that the more you have, the slower your system will function.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
xeroboundaries
I'm having the same problem. When I paste into platformbase I get errors. Where should this code be placed? Thanks

Share this post


Link to post
Share on other sites
xeroboundaries
I am pasting into functions.php in base (the same time that I found the code snippet that's listed above). Should I be pasting into Platform Pro's functions.php?

Share this post


Link to post
Share on other sites
catrina
No, the functions.php file in base is where you should paste it. Where in the file did you paste it? It should be at the very bottom of the file.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
xeroboundaries
If I add: add_filter ( 'pagelines_foundry', 'my_google_font' ); function my_google_font( $thefoundry ) { $myfont = array( 'Ubuntu' => array( 'name' => 'Ubuntu', 'family' => '"Ubuntu", arial, serif', 'web_safe' => true, 'google' => true, 'monospace' => false ) ); return array_merge( $thefoundry, $myfont ); } to the bottom of my functions.php page in base, the font, Ubuntu, does not appear in Platform Pro's typography section. That being said, I do not get any errors anymore, it just doesn't work. Jack

Share this post


Link to post
Share on other sites
catrina
Have you tried replacing Ubuntu with a different Google Web Font to see if another one works?

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
xeroboundaries
I have the following pasted at the end of functions.php in base: add_filter ( 'pagelines_foundry', 'my_google_font' ); function my_google_font( $thefoundry ) { $myfont = array( 'Terminal Dosis' => array( 'name' => 'Terminal Dosis', 'family' => '"Terminal Dosis", arial, serif', 'web_safe' => true, 'google' => true, 'monospace' => false ) ); return array_merge( $thefoundry, $myfont ); } Not showing up under PlatformPro typography panel. Jack

Share this post


Link to post
Share on other sites
xeroboundaries
So I found that if I activate the base theme, the font will appear on the list, but I lose a lot of the settings that I set up using Platform Pro. Is there a way to get my custom hooks from base to carry over to platform pro without needing to keep the base them active (really just worried about this font for now)? Thanks

Share this post


Link to post
Share on other sites
Jenny
You must have PlatformBase activated in order for its functions.php to.. function. Just export your PlatformPro settings then import them into PlatformBase. Keep PlatformBase active at all time.

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites
Jenny
If you get everything working, don't forget to come back and accept an answer to close this topic. Thanks!

Jenny :: Web designer at Simple Mama (follow me at @simplemamacom)

Check out Share Me, a social sharing add-on for DMS that is super simple to set up.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×