Skip to content

Instantly share code, notes, and snippets.

@vortizhe
Created October 8, 2012 11:36
Show Gist options
  • Save vortizhe/3852053 to your computer and use it in GitHub Desktop.
Save vortizhe/3852053 to your computer and use it in GitHub Desktop.
Font-face with rails 3.2 asset pipeline
/***** SCSS *****/
@font-face {
font: {
family: 'family';
weight: 'normal';
style: 'normal';
}
src: asset-url('webfont.eot', font);
src: asset-url('webfont.eot', font) format('embedded-opentype'),
asset-url('webfont.woff', font) format('woff'),
asset-url('webfont.ttf', font) format('truetype'),
asset-url('webfont.svg#family', font) format('svg')
}
/***** Compass *****/
@include font-face('family', font-files('webfont.eot', 'webfont.woff', 'webfont.ttf', 'webfont.svg'), normal, normal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment