I want to include fonts to use them in pages. I created 2 folders in api/web/theme which are css and fonts css folder contains fonts.css and fonts contains tff files.
I created an asset bundle in common to use these files in email templates:
namespace common\assets;
use yii\web\AssetBundle;
class AppAssets extends AssetBundle
{
public $baseUrl = '@api/web/theme';
public $css = [
'css/fonts.css'
];
public function init()
{
parent::init();
}
}
when I run the page I get the following error:
Not allowed to load local resource: {{path}}/css/fonts.css
I tried to change permission of the folder theme but still it’s not working…
takeown /f api\web\theme* /r
icacls api\web\theme\ /grant Everyone:F /t