Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move bootstrap fonts to different folder?

I have a standard ASP.NET MVC application with Bootstrap. I moved the "Fonts" folder to "Content/Fonts". Inside the folder there are those glyphicons-halflings-regular files.

When I start the application I get a 404 browser error that the Fonts/glyphicons-halflings-regular.woff and glyphicons-halflings-regular.ttf file couldn't be found.

How do I configure my project so these files are found?

like image 487
L_M Avatar asked Dec 09 '14 07:12

L_M


2 Answers

Solution was to update pathes in my bootstrap.css. (See comments of original question)

Thx meep for your help.

like image 99
L_M Avatar answered Nov 18 '22 02:11

L_M


One solution is to update paths in bootstrap.css. However, when you update Bootstrap, your changes will be lost. I'd recommend simply moving your stylesheet as well to keep the hierarchical structure found in the unmodified stylesheet.

For example, if you want to move your fonts in the Contents/Fonts folder (I always hate it being loose in the project root folder too haha), have your styles in the Content/Styles folder so that ../fonts/glyphicons-halflings-regular.woff (and so on) still references the correct folder.

like image 4
dhughes Avatar answered Nov 18 '22 02:11

dhughes