// ============================================= // Web Fonts // Last Updated:2013-8-16 // ============================================= $web-font-classes: true !default; $web-font-names: "source-sans-pro" "museo-slab" "quicksand" !default; $web-font-files: "sourcesanspro-regular-webfont" "museo-slab-500-webfont" "quicksand-regular-webfont" !default; $placeholder-fonts: true !default; $placeholder-font-classes: true !default; $placeholder-font-names: "redacted" "redacted-script" "redacted-script-light" "redacted-script-bold" !default; $placeholder-font-files: "redacted-regular" "redacted-script-regular" "redacted-script-light" "redacted-script-bold" !default; @for $i from 1 through length($web-font-files) { @font-face { font-family: '#{nth($web-font-names, $i)}'; font-style: normal; font-weight: normal; src: url('#{$root_path}#{$fonts_path}#{nth($web-font-files, $i)}.eot'); src: url('#{$root_path}#{$fonts_path}#{nth($web-font-files, $i)}.eot#iefix') format('embedded-opentype'), url('#{$root_path}#{$fonts_path}#{nth($web-font-files, $i)}.woff') format('woff'), url('#{$root_path}#{$fonts_path}#{nth($web-font-files, $i)}.ttf') format('truetype'), url('#{$root_path}#{$fonts_path}#{nth($web-font-files, $i)}.svg##{nth($web-font-names, $i)}') format('svg'); } %#{nth($web-font-names, $i)} { @include font-stack(#{nth($web-font-names, $i)}); } @if $web-font-classes { .#{nth($web-font-names, $i)} { @extend %#{nth($web-font-names, $i)}; } } } @if $placeholder-fonts { @for $i from 1 through length($placeholder-font-files) { @font-face { font-family: '#{nth($placeholder-font-names, $i)}'; font-style: normal; font-weight: normal; src: url('#{$root_path}#{$fonts_path}#{nth($placeholder-font-files, $i)}.eot'); src: url('#{$root_path}#{$fonts_path}#{nth($placeholder-font-files, $i)}.eot#iefix') format('embedded-opentype'), url('#{$root_path}#{$fonts_path}#{nth($placeholder-font-files, $i)}.woff') format('woff'), url('#{$root_path}#{$fonts_path}#{nth($placeholder-font-files, $i)}.ttf') format('truetype'), url('#{$root_path}#{$fonts_path}#{nth($placeholder-font-files, $i)}.svg##{nth($placeholder-font-names, $i)}') format('svg'); } %#{nth($placeholder-font-names, $i)} { @include font-stack(#{nth($placeholder-font-names, $i)}); } @if $placeholder-font-classes { .#{nth($placeholder-font-names, $i)} { @extend %#{nth($placeholder-font-names, $i)}; } } } }