I am developing an application with jsf, primefaces and bootstrap 3.
The test page from glyphicons is perfectly displayed in my browser, but when I try to use the icons in the web project I only get weird symbols.
My best guess is that the glyphicons css file cannot find the fonts even though I copied them also into the project and let the relative pathes the same:
-resources
-css
-bootstrap.css
-bootstrap-glyphicons.css
-fonts
-glyphicons-halflings.eot
-glyphicons-halflings.otf
-glyphicons-halflings.svg
...
How can I make sure the css file finds my font directory / fix this error?
Inside bootstrap-glyphicons.css
replace following strings:
src:url('../fonts/glyphiconshalflings-regular.eot')
#{resource['fonts:glyphiconshalflings-regular.eot]}
src:url('../fonts/glyphiconshalflings-regular.eot?#iefix')
#{resource['fonts:glyphiconshalflings-regular.eot?#iefix]}
src:url('../fonts/glyphiconshalflings-regular.woff')
#{resource['fonts:glyphiconshalflings-regular.woff]}
src:url('../fonts/glyphiconshalflings-regular.ttf')
#{resource['fonts:glyphiconshalflings-regular.ttf]}
src:url('../fonts/glyphiconshalflings-regular.svg#glyphicons_halflingsregular')
#{resource['fonts:glyphiconshalflings-regular.svg#glyphicons_halflingsregular]}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With