Last active
January 29, 2016 06:07
-
-
Save mateusreis/4513213 to your computer and use it in GitHub Desktop.
Compass Font Files Helper example. http://compass-style.org/reference/compass/css3/font_face/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Put yout fonts in the compiled folder of your projec. Ex.: www.yoursite.com/css/fonts/ | |
// 2. To enable relative paths to assets via compass helper functions on config.rb uncomment relative_assets = true | |
// Import the Compass Font Face module | |
@import "compass/css3/font-face"; | |
// regular | |
@include font-face('cabin', | |
font-files( | |
'Cabin-Regular-webfont.woff', woff, | |
'Cabin-Regular-webfont.ttf', ttf, | |
'Cabin-Regular-webfont.svg', svg), | |
'Cabin-Regular-webfont.eot'); | |
// bold | |
@include font-face('cabin', | |
font-files( | |
'Cabin-Bold-webfont.woff', woff, | |
'Cabin-Bold-webfont.ttf', ttf, | |
'Cabin-Bold-webfont.svg', svg), | |
'Cabin-Bold-webfont.eot' | |
,bold,normal); | |
// italic | |
@include font-face('cabin', | |
font-files( | |
'Cabin-Italic-webfont.woff', woff, | |
'Cabin-Italic-webfont.ttf', ttf, | |
'Cabin-Italic-webfont.svg', svg), | |
'Cabin-Italic-webfont.eot' | |
,normal,italic); | |
// bold + italic | |
@include font-face('cabin', | |
font-files( | |
'Cabin-BoldItalic-webfont.woff', woff, | |
'Cabin-BoldItalic-webfont.ttf', ttf, | |
'Cabin-BoldItalic-webfont.svg', svg), | |
'Cabin-BoldItalic-webfont.eot' | |
,bold,italic); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment