diff --git a/frameworks/compass/stylesheets/compass/utilities/text/_fonts.sass b/frameworks/compass/stylesheets/compass/utilities/text/_fonts.sass new file mode 100644 index 00000000..da02ee6d --- /dev/null +++ b/frameworks/compass/stylesheets/compass/utilities/text/_fonts.sass @@ -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') diff --git a/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass b/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass index 6d130f32..2731383b 100644 --- a/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass +++ b/lib/compass/frameworks/compass/stylesheets/compass/utilities/_text.sass @@ -1,2 +1,3 @@ @import text/nowrap.sass @import text/replacement.sass +@import text/fonts.sass \ No newline at end of file