Reputation: 209
How can I load Google fonts in CakePHP? I found one helper which is built for CakePHP 2.0. It's here: http://plugins.cakephp.org/p/1277-CakePHP-Font-Plugin
But when I try to integrate it in my AppController using this:
public $helpers = array('Session','Html', 'Js', 'Form', 'GoogleFont');
, the result is:
Strict (2048): Declaration of GoogleFontHelper::url() should be compatible with Helper::url($url = NULL, $full = false) [APP/View/Helper/GoogleFontHelper.php, line 50]
So is this GoogleFontHelper incompatible with CakePHP 2.3.6.?
Or is there another way of loading Google fonts?
Upvotes: 1
Views: 2755
Reputation: 17894
Am i missing something, why do you need a helper? Cant you just do..
echo $this->Html->css('http://fonts.googleapis.com/css?family=Open+Sans:300,400,700');
Or add it directly to your css file using @import
like kicaj says.
Upvotes: 7