Answer the question
In order to leave comments, you need to log in
How to include fonts in yii2?
How to include fonts in yii2?
Answer the question
In order to leave comments, you need to log in
<?php
namespace app\assets;
use yii\web\AssetBundle;
class FontAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'//fonts.googleapis.com/css?family=Open+Sans:400,700',
'//fonts.googleapis.com/css?family=Ubuntu:400,700',
'//fonts.googleapis.com/css?family=Oswald:400,700'
];
public $cssOptions = [
'type' => 'text/css',
];
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question