Sha256: 40c87ca2a21a8cb14d705ae407a4c6bd3389e319c8e0fdcfd2735680228a8ac1

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

<%
file_name = if @opts[:font_face_path]
  File.join @opts[:font_face_path], @data[:file_name]
else
  @data[:file_name]
end
%>/* 
 * Font Custom: bare CSS
 */

@font-face {
  font-family: "<%= @opts[:font_name] %>";
  src: url("<%= file_name %>.eot");
  src: url("<%= file_name %>.eot?#iefix") format("embedded-opentype"),
       url("<%= file_name %>.woff") format("woff"),
       url("<%= file_name %>.ttf") format("truetype"),
       url("<%= file_name %>.svg#<%= @opts[:font_name] %>") format("svg");
  font-weight: normal;
  font-style: normal;
}

<%= @data[:glyphs].map {|name| ".#{@opts[:css_prefix] + name}:before"}.join(",\n") %> {
  font-family: "<%= @opts[:font_name] %>";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  text-decoration: inherit;
}
<% @data[:glyphs].each_with_index do |name, index| %>
.<%= @opts[:css_prefix] + name %>:before { content: "\<%= (61696+index).to_s(16) %>"; }<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fontcustom-1.0.1 lib/fontcustom/templates/_fontcustom.scss
fontcustom-1.0.0 lib/fontcustom/templates/_fontcustom.scss
fontcustom-1.0.0.pre2 lib/fontcustom/templates/_fontcustom.scss