2

Following is my HTML markup

<button class="btn btn-default" type="submit">
<i class="glyphicon glyphicon-camera"></i>
</button>

I have change following line variable.less

@icon-font-path:          "..\fonts";

the fonts folder contains four files - eot, svg, ttf and woff extension files for glyphicons-halflins

Following is how the folder structure is -

  • Content\bootstrap.css
  • Content\bootswatch.css
  • Content\variables.less
  • Contact\fonts-- all four files (extensions - eot, svg, ttf, and woff)

Any idea why it doesn't display icon in the webpage?

Any help on this much appreciated.

cvrebert
  • 9,075
  • 2
  • 38
  • 49
Nirman
  • 6,715
  • 19
  • 72
  • 139
  • 1) Is this in development or once deployed? 2) Is what you've posted for `@icon-font-path` what it currently is, or what it was before you changed it? Your wording is unclear. – Chris Pratt Aug 08 '14 at 19:59
  • 1) this is in the development itself.. 2) @icon-font-path was same when I downloaded variables.less file from bootply... – Nirman Aug 09 '14 at 14:01

2 Answers2

2

You used a backslash for specifying the path. Have you tried it with a forward slash? Have a look at Is there a way to set a common image path for LESS files?. All of them used forward slashes.

Community
  • 1
  • 1
Thylossus
  • 302
  • 1
  • 3
  • 11
  • Oh, ok. I thought that was the problem. But take a look at Chris Pratt's answer. I think he actually got it. – Thylossus Aug 10 '14 at 09:46
2

Well, your path is wrong, then. variables.less is in /Content and your font files are in /Content/fonts, but your path is saying go up one level from /Content, making it just / and then look for the fonts directory there, i.e. /fonts, not /Content/fonts. Remove the ../ portion of your font path and try again.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444