From ede2279312fb8145597e6be2b23a899f901ad97c Mon Sep 17 00:00:00 2001 From: Nathaniel Bibler Date: Sat, 31 Oct 2015 15:36:28 -0400 Subject: [PATCH] Switch to Google Fonts. The intent is to remove the Typekit JavaScript execution and subsequent network requests to improve load times. Google Fonts only requires one non-authenticated, cached stylesheet request. This changes the body font from JAF Bernino Sans to Carrois Gothic and the "bold" Source Code Pro was reduced from Ultra Bold (900) to Bold (700). --- source/assets/stylesheets/application.sass | 12 +++++++++--- source/layouts/layout.haml | 3 +-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source/assets/stylesheets/application.sass b/source/assets/stylesheets/application.sass index 41969ce..a76c933 100644 --- a/source/assets/stylesheets/application.sass +++ b/source/assets/stylesheets/application.sass @@ -1,5 +1,8 @@ +$base-font-family: "Carrois Gothic", "Helvetica Neue", Helvetica, Arial, sans-serif +$source-code-font-family: "Source Code Pro", monospace + html - font: 14px/1.4 "jaf-bernino-sans", "Helvetica Neue", Helvetica, Arial, sans-serif + font: 14px/1.4 $base-font-family color: #333 a @@ -14,7 +17,7 @@ h1 color: #C647BF font-size: 3.8em font-weight: bold - font-family: "source-code-pro", monospace + font-family: $source-code-font-family margin-bottom: 0 line-height: 1 @@ -27,7 +30,7 @@ h1, h2 h3 font-size: 1.3em - font-family: "source-code-pro", monospace + font-family: $source-code-font-family margin-bottom: 0 position: relative padding-left: .1em @@ -112,3 +115,6 @@ footer display: inline list-style-type: none padding-right: 20px + +pre + font-family: $source-code-font-family diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index 3801e1e..838b4f9 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -20,10 +20,9 @@ %link{rel: 'canonical', href: path_to_url(current_page.url)} %title= current_page.data.title + = stylesheet_link_tag '//fonts.googleapis.com/css?family=Carrois+Gothic|Source+Code+Pro:400,700' = stylesheet_link_tag 'application' - = javascript_include_tag "//use.typekit.net/tng8liq.js" - :javascript try{Typekit.load();}catch(e){}