smiley font-face

This commit is contained in:
Eric Meyer 2010-07-18 15:40:31 -06:00 committed by Chris Eppstein
parent 732dead236
commit b85c6f68f5

View File

@ -6,29 +6,25 @@
// * $font-files is required using font-files('relative/location', 'format'). // * $font-files is required using font-files('relative/location', 'format').
// for best results use this order: woff, opentype/truetype, svg // for best results use this order: woff, opentype/truetype, svg
// * $eot is required by IE, and is a relative location of the eot file. // * $eot is required by IE, and is a relative location of the eot file.
// * postscript name is required by some browsers to look for local fonts.
@mixin font-face($name, $font-files, $eot: false, $postscript: false, $style: false) { @mixin font-face($name, $font-files, $eot: false) {
@font-face { @font-face {
font-family: "#{$name}"; font-family: quote($name);
@if $style {
font-style: $style; }
@if $eot { @if $eot {
src: font-url($eot); } src: font-url($eot); }
@if $postscript { src: local(""), $font-files;
src: local(""), local("#{$postscript}"), #{$font-files}; } }
@else { }
src: local(""), #{$font-files}; } } }
// EXAMPLE // EXAMPLE
// +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot", "thisname") // +font-face("this name", font-files("this.woff", "woff", "this.otf", "opentype"), "this.eot")
// //
// will generate: // will generate:
// //
// @font-face { // @font-face {
// font-family: 'this name'; // font-family: 'this name';
// src: url('fonts/this.eot'); // src: url('fonts/this.eot');
// src: local('this name'), local('thisname'), // src: local(""),
// url('this.otf') format('woff'), // url('fonts/this.otf') format('woff'),
// url('this.woff') format('opentype'); // url('fonts/this.woff') format('opentype');
// } // }