Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacing the standard Glyphicons Halflings with Glyphicons PRO in Bootstrap 3?

I've bought the full Glyphicons PRO package and want to use it with Bootstrap 3.

However, I can't seem to find comprehensive documentation on how to do this. The Glyphicons site lacks a "How to use section" and an accompanying PDF isn't much help either - it was mentioning a glyphicons.css file that wasn't part of the download package...

Any help on how to make this replacement is much appreciated.

like image 786
agibsen Avatar asked Feb 26 '14 12:02

agibsen


People also ask

How do I use Glyphicons in bootstrap 3?

Bootstrap 3 Glyphicons are actually fonts, so you can scale them and color them as you please. Bootstrap previously used image sprites for icons. To add a glyphicon, add a <span> tag with Bootstrap's . glyphicon class and also the class for the specific glyphicon that you require.

How do I load Glyphicons in bootstrap?

You don't have to do anything 'special' to load Bootstrap Glyphicons, except make sure your folder structure is set up appropriately. Note, you need both classes. The first class glyphicon sets up the basic styles while glyphicon-comment sets the specific image. I would just add one more thing.

Does bootstrap 5 support Glyphicons?

Bootstrap includes 260 glyphs from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost.

Why is the Glyphicons used in bootstrap?

Bootstrap provides set of graphic icons, symbols and fonts called Glyphicons. Some Glyphicons like Home icon, User icon, Lock icon, etc. Generally, Glyphicons are icon fonts which you can use in your web projects.


1 Answers

In your bootstrap folder is a fonts folder (mostly in the CSS folder) that contains the Glyphicons fonts.

Those need to be replaced with the pro version you have.

Next you need to point (if the fonts not having the same name) to your new fonts in the bootstrap CSS. This depends on what technology you are using.

But you have to search for:

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('fonts/bootstrap/glyphicons-halflings-regular.eot');
  src: url('fonts/bootstrap/glyphicons-halflings-regular.eot?#iefix') format("embedded-opentype"), url('fonts/bootstrap/glyphicons-halflings-regular.woff') format("woff"), url('fonts/bootstrap/glyphicons-halflings-regular.ttf') format("truetype"), url('fonts/bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format("svg");
}

and replace the font file names (or maybe location if you are placing them in another place)

like image 148
Mark Avatar answered Sep 17 '22 08:09

Mark