Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit bd3ac3661208dc4c7bd448880e413b32f93605b6 @adamstac committed Nov 23, 2011
@@ -0,0 +1,3 @@
+.sass-cache
+.DS_Store
+*.gem
@@ -0,0 +1 @@
+rvm ruby-1.9.2@font-stacks --create
@@ -0,0 +1,3 @@
+# 0.0.1
+
+* Initial release for testing
@@ -0,0 +1,15 @@
+source :rubygems
+
+gem 'compass', '~> 0.11.5'
+
+group :development do
+ gem 'rake'
+ gem 'heroku'
+end
+
+group :serve do
+ gem 'serve', '~> 1.5.1'
+ gem 'haml', '~> 3.1.3'
+ gem 'css_parser', '~> 1.2.5'
+ gem 'maruku', '~> 0.6.0'
+end
@@ -0,0 +1,58 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activesupport (3.1.0)
+ multi_json (~> 1.0)
+ addressable (2.2.6)
+ chunky_png (1.2.1)
+ compass (0.11.5)
+ chunky_png (~> 1.2)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
+ css_parser (1.2.5)
+ addressable
+ fssm (0.2.7)
+ haml (3.1.3)
+ heroku (2.7.0)
+ launchy (>= 0.3.2)
+ rest-client (~> 1.6.1)
+ rubyzip
+ term-ansicolor (~> 1.0.5)
+ i18n (0.6.0)
+ launchy (2.0.5)
+ addressable (~> 2.2.6)
+ maruku (0.6.0)
+ syntax (>= 1.0.0)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ rack (1.3.2)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ rubyzip (0.9.4)
+ sass (3.1.7)
+ serve (1.5.1)
+ activesupport (~> 3.0)
+ i18n
+ rack (~> 1.2)
+ rack-test (~> 0.5)
+ tilt (~> 1.3)
+ tzinfo
+ syntax (1.0.0)
+ term-ansicolor (1.0.6)
+ tilt (1.3.3)
+ tzinfo (0.3.29)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ compass (~> 0.11.5)
+ css_parser (~> 1.2.5)
+ haml (~> 3.1.3)
+ heroku
+ maruku (~> 0.6.0)
+ rake
+ serve (~> 1.5.1)
@@ -0,0 +1,21 @@
+# Font Stacks
+
+Font Stacks is a work in progress, but feel free to try it out.
+
+## Installation
+
+...
+
+## Usage
+
+...
+
+## License
+
+Copyright (c) 2011 Adam Stacoviak
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,25 @@
+require './lib/font-stacks'
+
+namespace :sass do
+
+ desc "Converts the Sass to SCSS"
+ task :convert do
+ puts "*** Converting Sass to SCSS ***"
+ system "sass-convert stylesheets/*.sass stylesheets/*.scss"
+ end
+
+end
+
+namespace :gem do
+
+ desc "Build the gem"
+ task :build do
+ system "gem build *.gemspec"
+ end
+
+ desc "Build and release the gem"
+ task :release => :build do
+ system "gem push font-stacks-#{FontStacks::VERSION}.gem"
+ end
+
+end
@@ -0,0 +1,27 @@
+require './lib/font-stacks'
+
+Gem::Specification.new do |s|
+ # Release information
+ s.version = FontStacks::VERSION
+ s.date = FontStacks::DATE
+
+ # Gem author details
+ s.name = "font-stacks"
+ s.description = %q{Compass extension description}
+ s.summary = %q{Compass extension summary}
+ s.authors = ["Author Name"]
+ s.email = ["author@email.com"]
+ s.homepage = "http://font-stacks.com/"
+
+ # Gem files
+ # These are the files that get distributated in the gem
+ s.files = ["README.mdown"]
+ s.files += Dir.glob("lib/**/*.*")
+ s.files += Dir.glob("stylesheets/**/*.*")
+
+ # Gem bookkeeping
+ s.required_rubygems_version = ">= 1.3.6"
+ s.rubygems_version = %q{1.3.6}
+ # Adding a dependency for Compass ensures we also install Sass
+ s.add_dependency("compass", [">= 0.11.5"])
+end
@@ -0,0 +1,9 @@
+require 'compass'
+Compass::Frameworks.register("font-stacks", :path => "#{File.dirname(__FILE__)}/..")
+
+module FontStacks
+
+ VERSION = "0.0.1"
+ DATE = "2011-09-15"
+
+end
@@ -0,0 +1,170 @@
+// FONT STACKS
+
+// Initial idea based on Bedrock's font-stacks partial
+// Large re-factor based on "Revised Font Stacks" by Amrinder Sandhu - http://www.awayback.com/revised-font-stack/
+
+// Notes:
+//
+// Some of the fonts, like: Garamond, Baskerville and Didot are not as readable on screen as Georgia. Feel free to make your own selection.
+// Due to smaller x-height; Caslon, Didot, Garamond, Baskerville and Hoefler Text should be set at minimum of 14 pixels or above.
+// Lucida Grande, Futura and Tahoma are mechanically obliqued to fake an italic.
+// Geneva, Baskerville Old Face and Big Caslon has no bold and italic. They are faked to bold and italic.
+// Avoid using Helvetica or Helvetica Neue for body text, especially below 14px.
+// Futura, Gill Sans and Franklin Gothic Medium should be carefully stacked and used because of their unusual weight.
+
+@function font-family($family) {
+
+ //
+ // Serif
+ //
+
+ // BASKERVILLE ( 88.60% on Mac, 49.10% on Windows)
+ @if $family == "baskerville" {
+ @return Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
+ }
+
+ // BIG CASLON (85.10% on Mac)
+ @else if $family == "big-caslon" {
+ @return "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif;
+ }
+
+ // BODONI (47.89% on Windows)
+ @else if $family == "bodoni-mt" {
+ @return "Bodoni MT", Didot, "Didot LT STD", "Hoefler Text", Garamond, "Times New Roman", serif;
+ }
+
+ // BOOK ANTIQUA (86.09% on Mac)
+ @else if $family == "book-antiqua" {
+ @return "Book Antiqua", Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
+ }
+
+ // CAMBRIA (54.51% on Windows)
+ @else if $family == "cambria" {
+ @return Cambria, Georgia, serif;
+ }
+
+ // CONSTANTIA (53.81% on Windows)
+ @else if $family == "constantia" {
+ @return Constantia, Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
+ }
+
+ // DIDOT (87.72% on Mac)
+ @else if $family == "didot" {
+ @return Didot, "Didot LT STD", "Hoefler Text", Garamond, "Times New Roman", serif;
+ }
+
+ // GARAMOND (23.84% on Mac, 86.24% on Windows)
+ @else if $family == "garamond" {
+ @return Garamond, Baskerville, "Baskerville Old Face", "Hoefler Text", "Times New Roman", serif;
+ }
+
+ // GOUDY OLD STYLE (51.30% on Windows)
+ @else if $family == "goudy-old-style" {
+ @return "Goudy Old Style", Garamond, "Big Caslon", "Times New Roman", serif;
+ }
+
+ // HOEFLER TEXT (88.70% on Mac, 1.16% on Windows)
+ @else if $family == "hoefler-text" {
+ @return "Hoefler Text", "Baskerville old face", Garamond, "Times New Roman", serif;
+ }
+
+ // LUCIDA BRIGHT (64.90% on Mac, 33.84% on Windows) - huge x-height
+ @else if $family == "lucida-bright" {
+ @return "Lucida Bright", Georgia, serif;
+ }
+
+ // PALATINO (79.71% on Mac, 98.04% on Windows)
+ @else if $family == "palatino" {
+ @return Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
+ }
+
+ //
+ // Sans-serif
+ //
+
+ // CALIBRI (54.76% on Windows)
+ @else if $family == "calibri" {
+ @return Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
+ }
+
+ // CANDARA (54.31% on Windows)
+ @else if $family == "candara" {
+ @return Candara, Calibri, Segoe, "Segoe UI", Optima, Arial, sans-serif;
+ }
+
+ // FRANKLIN GOTHIC MEDIUM (97.89% on Windows)
+ @else if $family == "franklin-gothic-medium" {
+ @return "Franklin Gothic Medium", Arial, sans-serif;
+ }
+
+ // FUTURA (91.01% on Mac)
+ @else if $family == "futura" {
+ @return Futura, "Trebuchet MS", Arial, sans-serif;
+ }
+
+ // GENEVA (98.84% on Mac)
+ @else if $family == "geneva" {
+ @return Geneva, Tahoma, Verdana, sans-serif;
+ }
+
+ // GILL SANS (91.52% on Mac, 51.74% on Windows)
+ @else if $family == "gill-sans" {
+ @return "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+ }
+
+ // HELVETICA NEUE (94.74% on Mac)
+ @else if $family == "helvetica-neue" {
+ @return "Helvetica Neue", Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
+ }
+ // Alias to "helvetica-neue"
+ @else if $family == "helvetica" { @return font-stack("helvetica-neue"); }
+
+ // LUCIDA GRANDE (99.13% on Mac, 98.25% on Windows)
+ @else if $family == "lucida-grande" {
+ @return "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
+ }
+ // Alias to "lucida"
+ @else if $family == "lucida" { @return font-stack("lucida-grande"); }
+
+ // OPTIMA (90.14% on Mac)
+ @else if $family == "optima" {
+ @return Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;
+ }
+
+ // SEGOE (45.04% on Windows)
+ @else if $family == "segoe" {
+ @return Segoe, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
+ }
+
+ // TAHOMA (99.30% on Windows)
+ @else if $family == "tahoma" {
+ @return Tahoma, Geneva, Verdana, sans-serif;
+ }
+
+ // TREBUCHET (94.20% on Mac, 99% on Windows)
+ @else if $family == "trebuchet-ms" {
+ @return "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
+ }
+
+ // VERDANA (96.81% on Mac, 99.40% on Windows)
+ @else if $family == "verdana" {
+ @return Verdana, Geneva, sans-serif;
+ }
+
+ @else {
+ @return sans-serif;
+ }
+
+}
+
+@function font-stack($family) {
+ @return font-family($family);
+}
+
+@function ff($family) {
+ @return font-family($family);
+}
+
+@function fs($family) {
+ @return font-family($family);
+}
Oops, something went wrong.

0 comments on commit bd3ac36

Please sign in to comment.