How to connect the FontAwesome in the project with Symfony2?

Such business - the project it was decided to use fontawesome whose files were successfully copied to
@AcmeDemoBundle/Resources/public/css/plugin
@AcmeDemoBundle/Resources/public/fonts

composer update successfully moved them respectively in
web/bundles/acmedemo/
but the trouble is, they are not picked up in the draft and that's it, appeal to
../fonts/fontawesome-webfont.woff
throws 404 error
helps only prescribe a puttee in the config
assets:
# fontawesome-webfont-woff:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/fontawesome-webfont.woff
# output: fonts/fontawesome-webfont.woff
# 
# fontawesome-otf:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/FontAwesome.otf
# output: fonts/FontAwesome.otf
# fontawesome-webfont-eot:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/fontawesome-webfont.eot
# output: fonts/fontawesome-webfont.eot
# 
# fontawesome-webfont-svg:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/fontawesome-webfont.svg
# output: fonts/fontawesome-webfont.svg
# 
# fontawesome-webfont-ttf:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/fontawesome-webfont.ttf
# output: fonts/fontawesome-webfont.ttf
# 
# glyphicons-halflings-regular-eot:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/glyphicons-halflings-regular.eot
# output: fonts/glyphicons-halflings-regular.eot
# 
# glyphicons-halflings-regular-svg:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/glyphicons-halflings-regular.svg
# output: fonts/glyphicons-halflings-regular.svg
# 
# glyphicons-halflings-regular-ttf:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/glyphicons-halflings-regular.ttf
# output: fonts/glyphicons-halflings-regular.ttf
# 
# glyphicons-halflings-regular-woff:
# inputs:
# - @AcmeDemoBundle/Resources/public/fonts/glyphicons-halflings-regular.woff
# output: fonts/glyphicons-halflings-regular.woff


in this case, after console assetic:dump (in the dev environment accordingly) everything works and is nice, but for each font all register, who have faced? Or who have real projects with the implementation of fontawesome share your experience
September 26th 19 at 06:36
1 answer
September 26th 19 at 06:38
If you are using css, you can use the cssrewrite filter. But in this case you cannot use the syntax @AcmeFooBundle, there's less written about it.

In my projects I use LESS, in this case, everything becomes much easier: you will just need to override the variable that stores the path to the fonts.

Example:

src/Acme/DemoBundle/Resourcel/public/app.less (main less file for the project):

 'lib/fontawesome/less/font-awesome.less'; // plug-in fontawesome
@fa-font-path: "/bundles/acmedemo/fonts"; // override the path to the fonts
Over less thought, but the layout does the other person.
About cssrewrite forgot to write, in that case climbs src/Acme/DemoBundle/Resources/...., not an option. In principle it is still working. - Alize.Waters commented on September 26th 19 at 06:41

Find more questions by tags Symfony