Skip to content

Commit

Permalink
Move svg font face to the top of the list of options to reduce pixela…
Browse files Browse the repository at this point in the history
…tion of fonts in Chrome on Windows.
  • Loading branch information
Justin committed Nov 8, 2013
1 parent bd82cba commit ef32ade
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/_fontcustom-bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_alt %>.eot");
src: url("<%= @font_path_alt %>.eot?#iefix") format("embedded-opentype"),
url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg"),
url("<%= @font_path_alt %>.woff") format("woff"),
url("<%= @font_path_alt %>.ttf") format("truetype"),
url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
url("<%= @font_path_alt %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/_fontcustom-rails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
font-family: "<%= @opts.font_name %>";
src: font-url("<%= @font_path_alt %>.eot");
src: font-url("<%= @font_path_alt %>.eot?#iefix") format("embedded-opentype"),
font-url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg"),
font-url("<%= @font_path_alt %>.woff") format("woff"),
font-url("<%= @font_path_alt %>.ttf") format("truetype"),
font-url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
font-url("<%= @font_path_alt %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/_fontcustom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_alt %>.eot");
src: url("<%= @font_path_alt %>.eot?#iefix") format("embedded-opentype"),
url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg"),
url("<%= @font_path_alt %>.woff") format("woff"),
url("<%= @font_path_alt %>.ttf") format("truetype"),
url("<%= @font_path_alt %>.svg#<%= @opts.font_name %>") format("svg");
url("<%= @font_path_alt %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/fontcustom-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path %>.eot");
src: url("<%= @font_path %>.eot?#iefix") format("embedded-opentype"),
url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg"),
url("<%= @font_path %>.woff") format("woff"),
url("<%= @font_path %>.ttf") format("truetype"),
url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg");
url("<%= @font_path %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/fontcustom-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path_preview %>.eot");
src: url("<%= @font_path_preview %>.eot?#iefix") format("embedded-opentype"),
url("<%= @font_path_preview %>.svg#<%= @opts.font_name %>") format("svg"),
url("<%= @font_path_preview %>.woff") format("woff"),
url("<%= @font_path_preview %>.ttf") format("truetype"),
url("<%= @font_path_preview %>.svg#<%= @opts.font_name %>") format("svg");
url("<%= @font_path_preview %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/fontcustom/templates/fontcustom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
font-family: "<%= @opts.font_name %>";
src: url("<%= @font_path %>.eot");
src: url("<%= @font_path %>.eot?#iefix") format("embedded-opentype"),
url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg"),
url("<%= @font_path %>.woff") format("woff"),
url("<%= @font_path %>.ttf") format("truetype"),
url("<%= @font_path %>.svg#<%= @opts.font_name %>") format("svg");
url("<%= @font_path %>.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Expand Down

0 comments on commit ef32ade

Please # to comment.