Font face example.

This commit is contained in:
Chris Eppstein 2010-03-28 23:53:57 -07:00
parent f7841f7507
commit 128a551960
6 changed files with 24 additions and 1 deletions

View File

@ -7,9 +7,11 @@ project_path = File.expand_path(File.join(File.dirname(__FILE__), '..'))
css_dir = "../docs/stylesheets" css_dir = "../docs/stylesheets"
sass_dir = "content/stylesheets" sass_dir = "content/stylesheets"
images_dir = "assets/images" images_dir = "assets/images"
javascripts_dir = "content/javascripts" javascripts_dir = "assets/javascripts"
fonts_dir = "assets/fonts"
http_javascripts_dir = "javascripts" http_javascripts_dir = "javascripts"
http_stylesheets_dir = "stylesheets" http_stylesheets_dir = "stylesheets"
http_images_dir = "images" http_images_dir = "images"
http_fonts_dir = "fonts"
# To enable relative paths to assets via compass helper functions. Uncomment: # To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true # relative_assets = true

View File

@ -56,6 +56,10 @@ route '/assets/javascripts/*/' do
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension] SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
end end
route '/assets/fonts/*/' do
SITE_ROOT+item.identifier.chop[7..-1]+"."+item[:extension]
end
route '/stylesheets/*/' do route '/stylesheets/*/' do
# don't generate a directory like we do for HTML files # don't generate a directory like we do for HTML files
SITE_ROOT+item.identifier.chop + '.css' SITE_ROOT+item.identifier.chop + '.css'

Binary file not shown.

View File

@ -0,0 +1,8 @@
---
title: Compass Font Face Example
description: How to use the @font-face mixin
framework: compass
stylesheet: compass/css3/_font_face.sass
example: true
---
= render "partials/example"

View File

@ -0,0 +1,3 @@
.example
%h1 The Quick Brown Fox
%p Jumped over the log.

View File

@ -0,0 +1,6 @@
@import compass/css3
+font-face("Angelina", font_files("examples/angelina.ttf", "truetype"))
.example
font-family: "Angelina"
padding: 1em