Created
December 19, 2016 23:58
-
-
Save gabrielgodoy-zz/ea7dcd8ad05285b29d4dc2521a0c22de to your computer and use it in GitHub Desktop.
Generates CSS for font-face
This file contains hidden or 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
font-url(file) | |
return "../fonts/" + file | |
webfont(family, file, hack-chrome-windows = false, weight = "normal") | |
@font-face | |
font-family family | |
src url(font-url(file + ".eot")) | |
src url(font-url(file + ".eot?#iefix")) format("embedded-opentype"), url(font-url(file + ".woff")) format("woff"), url(font-url(file + ".ttf")) format("truetype"), url(font-url(file + ".svg#" + family)) format("svg") | |
font-weight weight | |
font-style normal | |
if hack-chrome-windows | |
@media screen and (-webkit-min-device-pixel-ratio: 0) | |
@font-face | |
font-family family | |
src url(font-url(file + ".svg#" + family)) format("svg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment