Skip to content

Instantly share code, notes, and snippets.

@kunambi
Created June 25, 2014 11:20
Show Gist options
  • Save kunambi/c93b1bafe121ffa1e3f2 to your computer and use it in GitHub Desktop.
Save kunambi/c93b1bafe121ffa1e3f2 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
@mixin fontface($fontname: "", $fontfile: "", $path: "", $weightnames: "", $weightnos: "", $fontvariant: "") {
$totalnofonts: length($weightnames);
@if ($totalnofonts > 0) {
$path: $path + $fontfile;
$i: 0;
@while $i < $totalnofonts {
$weightnameidx: $i + 1;
$weightno: nth($weightnos, $weightnameidx);
$weightname: nth($weightnames, $weightnameidx);
@font-face {
font-family: "#{$fontname}";
src: url('#{$path}-#{nth($weightnames, $weightnameidx)}#{$fontvariant}.eot');
src:
url('#{$path}-#{nth($weightnames, $weightnameidx)}#{$fontvariant}.eot?#iefix') format('embedded-opentype'),
url('#{$path}-#{nth($weightnames, $weightnameidx)}#{$fontvariant}.woff') format('woff'),
url('#{$path}-#{nth($weightnames, $weightnameidx)}#{$fontvariant}.svg##{$fontfile}#{$weightname}') format('svg'),
url('#{$path}-#{nth($weightnames, $weightnameidx)}#{$fontvariant}.ttf') format('truetype');
font-weight: $weightno;
font-style: normal;
}
$i: $i + 1;
}
}
}
@include fontface(Argumentum, argumentum, "/css/fonts/", (black bold medium regular light ultralight), (900 700 500 400 300 100));
@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-#000.eot");src:url("/css/fonts/argumentum-#000.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-#000.woff") format("woff"),url("/css/fonts/argumentum-#000.svg#argumentum#000") format("svg"),url("/css/fonts/argumentum-#000.ttf") format("truetype");font-weight:900;font-style:normal}@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-bold.eot");src:url("/css/fonts/argumentum-bold.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-bold.woff") format("woff"),url("/css/fonts/argumentum-bold.svg#argumentumbold") format("svg"),url("/css/fonts/argumentum-bold.ttf") format("truetype");font-weight:700;font-style:normal}@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-medium.eot");src:url("/css/fonts/argumentum-medium.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-medium.woff") format("woff"),url("/css/fonts/argumentum-medium.svg#argumentummedium") format("svg"),url("/css/fonts/argumentum-medium.ttf") format("truetype");font-weight:500;font-style:normal}@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-regular.eot");src:url("/css/fonts/argumentum-regular.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-regular.woff") format("woff"),url("/css/fonts/argumentum-regular.svg#argumentumregular") format("svg"),url("/css/fonts/argumentum-regular.ttf") format("truetype");font-weight:400;font-style:normal}@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-light.eot");src:url("/css/fonts/argumentum-light.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-light.woff") format("woff"),url("/css/fonts/argumentum-light.svg#argumentumlight") format("svg"),url("/css/fonts/argumentum-light.ttf") format("truetype");font-weight:300;font-style:normal}@font-face{font-family:"Argumentum";src:url("/css/fonts/argumentum-ultralight.eot");src:url("/css/fonts/argumentum-ultralight.eot?#iefix") format("embedded-opentype"),url("/css/fonts/argumentum-ultralight.woff") format("woff"),url("/css/fonts/argumentum-ultralight.svg#argumentumultralight") format("svg"),url("/css/fonts/argumentum-ultralight.ttf") format("truetype");font-weight:100;font-style:normal}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment