rmrevin / yii2-fontawesome

Asset Bundle for Yii2 with Font Awesome http://fortawesome.github.io/Font-Awesome/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fonts are not loaded via asset

alexgivi opened this issue · comments

AssetBundle only adds css to result page. Fonts are not loaded, so icons doesn't work.
one way to avoid this problem - is to copy fonts to web dir, and make own css with fonts description.
Yii2 doesn't allow publish any files except css and js via assets mechanism, so, it's necessary to find a way to publish this files.

is possible to solve this?

@alexgivi @Mirkhamidov show your app configuration

@rmrevin I just added as dependency to main AppAaset

@Mirkhamidov Good. But I do not know how your assets are published. Open the debug panel of your browser and see where the font files are trying to load. If the location is incorrect, try to find the cause in the configuration of your web directory and assetManager component.

2018-05-10 18-11-35
font is loaded by browser, but on page i see
2018-05-10 18-12-49
maybe it's wrong font files... why don't you use https://github.com/FortAwesome/Font-Awesome repo as required dependency of your repo?

interesting, that FAS is working correct. FAR and FAL - icons doesn't show.

@alexgivi @Mirkhamidov , guys you are probably mixing CSS rules. Be sure not to duplicate Fontawesome in your old style sheets. @rmrevin vendor works fine for me.

@alexgivi You use free version of font. https://fontawesome.com/pro (light and regular - only in pro version).

Can't reproduce bug.