grunt-webfonts
Version:
SVG to webfont converter for Grunt
57 lines (54 loc) • 1.77 kB
CSS
/* Generated by grunt-webfont */
<% if (fontfaceStyles) { %>
<% if (fontPathVariables && stylesheet !== 'css') { %>
<%= fontPathVariable %>
<% } %>
<% if (fontSrc1 && embed.length) { %>
-face {
font-family:"<%= fontFamilyName %>";
src:<%= fontSrc1 %>;
font-weight:normal;
font-style:normal;
}
<% } %>-face {
font-family:"<%= fontFamilyName %>";<% if (fontSrc1) { %>
src:<%= fontSrc1 %>;<% }%>
src:<%= fontSrc2 %>;
font-weight:normal;
font-style:normal;
}
<% } %>
<% if (baseStyles) { %>.<%= baseClass %><% if (addLigatures) { %>,
.ligature-icons<% } %> {
<% if (stylesheet === 'less') { %>&:before {<% } %>
font-family:"<%= fontFamilyName %>";
<% if (stylesheet === 'less') { %>}<% } %>
display:inline-block;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
<% } %>
<% if (iconsStyles) { %>/* Icons */<% for (var glyphIdx = 0; glyphIdx < glyphs.length; glyphIdx++) { %>
<% if (stylesheet === 'less') { %>
.<%= classPrefix %><%= glyphs[glyphIdx] %> {
&:before {
content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
}<% if (ie7) {%>
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
<% } %>
}
<% } else { %>
<% if (ie7) {%>.<%= classPrefix %><%= glyphs[glyphIdx] %> {
*zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#x<%= codepoints[glyphIdx] %>;');
}
<% } %>
.<%= classPrefix %><%= glyphs[glyphIdx] %>:before {
content:"<% if (addLigatures) { %><%= glyphs[glyphIdx] %><% } else { %>\<%= codepoints[glyphIdx] %><% } %>";
}<% } } } %>