1

I've included glyphicon icons in my Laravel webapp in this way:

<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>

but they are not shown because the resource is not found.

Below the details of the HTTP 404:

GET http://localhost:8000/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-
halflings-regular.woff2 [HTTP/1.0 404 Not Found 168ms]
downloadable font: download failed (font-family: "Glyphicons Halflings" 
style:normal weight:normal stretch:normal src index:1): status=2147746065 
source: http://localhost:8000/fonts/vendor/bootstrap-
sass/bootstrap/glyphicons-halflings-regular.woff2?
448c34a56d699c29117adc64c43affeb

Thanks in advance.

Alessio Fiore
  • 467
  • 1
  • 7
  • 18
  • 2
    Does that error not explain what you need to do? They can't be found at the location they're being requested from... – Andy Holmes Oct 24 '17 at 14:05
  • the font loaded from ```http://localhost:8000/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2``` is not reachable to the server (404). Check if the path is correct – dede Oct 24 '17 at 14:32
  • Folder _your_project/public/fonts_ is missing. I create a standard laravel project using composer. Should I do something else? Laravel version is 5.5.12. – Alessio Fiore Oct 25 '17 at 07:32

2 Answers2

2

Check if there is glyphicons-halflings-regular.woff2 file under your_project/public/fonts/vendor/bootstrap-sass/bootstrap

The error is saying that your browser cannot find this file, maybe the path is wrong.

SyncroIT
  • 1,510
  • 1
  • 14
  • 26
  • Folder _your_project/public/fonts_ is missing. I create a standard laravel project using composer. Should I do something else? Laravel version is 5.5.12. – Alessio Fiore Oct 25 '17 at 07:24
  • Yes, you should include the fonts in your public folder, then change the path on your CSS file, so the browser will be able to fetch your fonts. – SyncroIT Oct 25 '17 at 10:59
0

You may simply use CDN for that in your html head.

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">

Now try-

<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>