Added utility for loading web fonts using @font-face.
This commit is contained in:
parent
5f32043c29
commit
5ea5d3d6f3
@ -0,0 +1,19 @@
|
|||||||
|
//**\\
|
||||||
|
@font-face loading utility
|
||||||
|
|
||||||
|
Provides custom web fonts that can be referenced by name for any font-family
|
||||||
|
declaration.
|
||||||
|
|
||||||
|
Set up the !font_path variable for where your font-files are stored. You
|
||||||
|
should have files in both .eot and .otf formats.
|
||||||
|
|
||||||
|
+font-face( "Compass Sans Regular", "compass_sans_reg", "CompassSans-Regular" )
|
||||||
|
|
||||||
|
!font_path ||= "/stylesheets/fonts"
|
||||||
|
|
||||||
|
=font-face(!family_name, !file_basename, !local_family_name)
|
||||||
|
!file_path = "#{!font_path}/#{!file_basename}"
|
||||||
|
@font-face
|
||||||
|
font-family= "'#{!family_name}'"
|
||||||
|
src= url(!file_path+".eot")
|
||||||
|
src= local("'#{!family_name}'"), local("'#{!local_family_name}'"), url(!file_path+".otf") format('opentype')
|
@ -1,2 +1,3 @@
|
|||||||
@import text/nowrap.sass
|
@import text/nowrap.sass
|
||||||
@import text/replacement.sass
|
@import text/replacement.sass
|
||||||
|
@import text/fonts.sass
|
Loading…
Reference in New Issue
Block a user