Closed jollyblume closed 11 years ago
can you test with font awesome instead ?
# MopaBootstrapBundle Configuration
mopa_bootstrap:
icons:
icon_set: fontawesome4
...
check if the font file is correctly loaded in your browser.
then reload assetic bundle symlinks
php app/console assets:install --symlink
It turns out my font wasn't loading.
I had my project in a folder under the web root. I moved the project to the web root and all is well.
Since the mopabootstrapbundle.less file sets @icon-font-path: "/bundles/mopabootstrap/bootstrap/fonts/";, the path to font files is hard coded from the web root and can't handle being anywhere else.
I also changed the @icon-font-path in my variable.less, which also worked.
Sorry for the issue.
glad you solved your problem. :+1:
I am using MopaBootstrapBundle:dev-master and twbs/bootstrap:3.0.x.
Icons are displaying as the character defined in the css:
I didn't have trouble before moving to tb3 and older versions of mopa.
I created a new symfony2 app and added a test bundle to show an icon test page (graphic shown above) to make sure nothing else in my app was causing this and can't find anything on the web that relates.
I've spent many hours trying to resolve this and am getting frustrated. Since there seem to be no other reports of this problem, I assume I am doing something goofy.
Every problem with icons I have seen relate to invalid paths to font files, but that is not the issue here.
Icons on the tb3 site (and other places) display properly.
Any help will be much appreciated.
Here are the gory details (default code from bundles not included):
AppKernel.php
config.yml
BrainGloveTestBundle::layout.html.twig
BrainGloveTestBundle:Default:index.html.twig
HTML page source:
CSS page source
... @font-face { font-family: "Glyphicons Halflings"; src: url("/bundles/mopabootstrap/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-pentype"), url("/bundles/mopabootstrap/bootstrap/fonts/glyphicons-halflings-regular.woff") format("woff"), url("/bundles/mopabootstrap/bootstrap/fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("/bundles/mopabootstrap/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); }