3

I don't know why, but my glyphicons from Bootstrap (3.3.7) are missing, they are being substituted by a normal and ugly square. Here is an example of code that calls a missing glyphicon:

        <button type="button" class="btn btn-default">
          <span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star
        </button>

And here it is the Bootstrap part that contains glyphicon's font:

 @font-face {
  font-family: 'Glyphicons Halflings';

  src: url('../fonts/glyphicons-halflings-regular.eot');
  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
Vithor Escames
  • 116
  • 1
  • 3
  • 17

3 Answers3

6

you need to update it , use cdn link, add this to your code

 <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
Otávio Barreto
  • 1,536
  • 3
  • 16
  • 35
1

You need to download Bootstrap in this link https://getbootstrap.com/docs/4.5/getting-started/download/, after download you need to put the fonts in your project. In the new version don't have fonts in Bootstrap package, but you can download in the older version.

David Newcomb
  • 10,639
  • 3
  • 49
  • 62
Vinícius
  • 443
  • 1
  • 8
  • 29
0

The same thing happened to me when I added caching. VS updated the web config with

            <clear/>
            <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="00:01:00" />
            <mimeMap fileExtension=".jpg" mimeType="image/jpg"/>
            <mimeMap fileExtension=".png" mimeType="image/jpg"/>
            <mimeMap fileExtension=".css" mimeType="text/css"/>
            <mimeMap fileExtension=".js" mimeType="text/javascript"/>

When you remove or comment-out these lines, the glyph icons display again.

Mike
  • 419
  • 4
  • 6