From 09ba859d9a6f95db49ef923395ea457b64439290 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Fri, 8 Jan 2016 17:42:32 -0800 Subject: Site design refresh part II: icon font Use slimmed icon font packaged by http://fontello.com/. I only need two glyphs: RSS and CC. I ended up picking the glyphs from the Entypo v2.0 family (https://github.com/danielbruce/entypo), licensed under SIL. I actually like the Font Awesome glyphs slightly better, but fontello currently only supports FA v4.3.0, which doesn't include the circular CC glyph I need. Old web fonts are kept for now. They will be removed after a while. See \#9. Open Sans is still in place and will be addressed later when the logo is attacked. The entire fontello package I downloaded, including the license, will be added to this repo as source/fonts/fontello/ later when I have implemented an exclude list in pyblog to prevent the directory from being copied to the deployment tree. --- source/css/fonts.css | 70 ++++++--------------------------------------- source/css/theme.css | 30 ++++++++++++------- source/fonts/fontello.eot | Bin 0 -> 5152 bytes source/fonts/fontello.svg | 13 +++++++++ source/fonts/fontello.ttf | Bin 0 -> 4984 bytes source/fonts/fontello.woff | Bin 0 -> 2872 bytes templates/template.html | 3 +- 7 files changed, 41 insertions(+), 75 deletions(-) create mode 100644 source/fonts/fontello.eot create mode 100644 source/fonts/fontello.svg create mode 100644 source/fonts/fontello.ttf create mode 100644 source/fonts/fontello.woff diff --git a/source/css/fonts.css b/source/css/fonts.css index e8995384..fbfedc58 100644 --- a/source/css/fonts.css +++ b/source/css/fonts.css @@ -1,16 +1,3 @@ -/* droid-sans-mono-regular - latin */ -@font-face { - font-family: 'Droid Sans Mono'; - font-style: normal; - font-weight: 400; - src: url('../fonts/droid-sans-mono-v7-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('Droid Sans Mono'), local('DroidSansMono'), - url('../fonts/droid-sans-mono-v7-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/droid-sans-mono-v7-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/droid-sans-mono-v7-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/droid-sans-mono-v7-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/droid-sans-mono-v7-latin-regular.svg#DroidSansMono') format('svg'); /* Legacy iOS */ -} /* open-sans-regular - latin */ @font-face { font-family: 'Open Sans'; @@ -24,55 +11,14 @@ url('../fonts/open-sans-v13-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ url('../fonts/open-sans-v13-latin-regular.svg#OpenSans') format('svg'); /* Legacy iOS */ } -/* pt-serif-regular - latin */ +/* icon font from fontello */ @font-face { - font-family: 'PT Serif'; + font-family: 'fontello'; + src: url('../fonts/fontello.eot'); + src: url('../fonts/fontello.eot?#iefix') format('embedded-opentype'), + url('../fonts/fontello.woff') format('woff'), + url('../fonts/fontello.ttf') format('truetype'), + url('../fonts/fontello.svg#fontello') format('svg'); + font-weight: normal; font-style: normal; - font-weight: 400; - src: url('../fonts/pt-serif-v8-latin-regular.eot'); /* IE9 Compat Modes */ - src: local('PT Serif'), local('PTSerif-Regular'), - url('../fonts/pt-serif-v8-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/pt-serif-v8-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/pt-serif-v8-latin-regular.woff') format('woff'), /* Modern Browsers */ - url('../fonts/pt-serif-v8-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/pt-serif-v8-latin-regular.svg#PTSerif') format('svg'); /* Legacy iOS */ -} -/* pt-serif-italic - latin */ -@font-face { - font-family: 'PT Serif'; - font-style: italic; - font-weight: 400; - src: url('../fonts/pt-serif-v8-latin-italic.eot'); /* IE9 Compat Modes */ - src: local('PT Serif Italic'), local('PTSerif-Italic'), - url('../fonts/pt-serif-v8-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/pt-serif-v8-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/pt-serif-v8-latin-italic.woff') format('woff'), /* Modern Browsers */ - url('../fonts/pt-serif-v8-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/pt-serif-v8-latin-italic.svg#PTSerif') format('svg'); /* Legacy iOS */ -} -/* pt-serif-700 - latin */ -@font-face { - font-family: 'PT Serif'; - font-style: normal; - font-weight: 700; - src: url('../fonts/pt-serif-v8-latin-700.eot'); /* IE9 Compat Modes */ - src: local('PT Serif Bold'), local('PTSerif-Bold'), - url('../fonts/pt-serif-v8-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/pt-serif-v8-latin-700.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/pt-serif-v8-latin-700.woff') format('woff'), /* Modern Browsers */ - url('../fonts/pt-serif-v8-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/pt-serif-v8-latin-700.svg#PTSerif') format('svg'); /* Legacy iOS */ -} -/* pt-serif-700italic - latin */ -@font-face { - font-family: 'PT Serif'; - font-style: italic; - font-weight: 700; - src: url('../fonts/pt-serif-v8-latin-700italic.eot'); /* IE9 Compat Modes */ - src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), - url('../fonts/pt-serif-v8-latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../fonts/pt-serif-v8-latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */ - url('../fonts/pt-serif-v8-latin-700italic.woff') format('woff'), /* Modern Browsers */ - url('../fonts/pt-serif-v8-latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../fonts/pt-serif-v8-latin-700italic.svg#PTSerif') format('svg'); /* Legacy iOS */ } diff --git a/source/css/theme.css b/source/css/theme.css index 83ceacb2..5909f7ab 100644 --- a/source/css/theme.css +++ b/source/css/theme.css @@ -226,27 +226,35 @@ noscript a { } .rss-icon, .atom-icon, .cc-icon { - position: relative; text-decoration: none; } .rss-icon, .atom-icon { - font-size: 16px; - margin: 0 2px; - top: 1px; -} - -/* fix problematic baseline shift in Firefox */ -@-moz-document url-prefix() { - .rss-icon { - top: 0; - } + margin: 0 3px; } .cc-icon { margin: 0 1px; } +.rss-icon:before, .atom-icon:before { + content: "\e800"; + font-family: fontello; + font-size: 105%; +} + +.rss-icon:before { + display: inline-block; + transform: scale(-1,1); + -webkit-transform: scale(-1,1); +} + +.cc-icon:before { + content: "\e801"; + font-family: fontello; + font-size: 95%; +} + /* blog index */ .blog-index-year-title { diff --git a/source/fonts/fontello.eot b/source/fonts/fontello.eot new file mode 100644 index 00000000..9f5d486b Binary files /dev/null and b/source/fonts/fontello.eot differ diff --git a/source/fonts/fontello.svg b/source/fonts/fontello.svg new file mode 100644 index 00000000..3ce4b9b1 --- /dev/null +++ b/source/fonts/fontello.svg @@ -0,0 +1,13 @@ + + + +Copyright (C) 2016 by original authors @ fontello.com + + + + + + + + + \ No newline at end of file diff --git a/source/fonts/fontello.ttf b/source/fonts/fontello.ttf new file mode 100644 index 00000000..4b372c14 Binary files /dev/null and b/source/fonts/fontello.ttf differ diff --git a/source/fonts/fontello.woff b/source/fonts/fontello.woff new file mode 100644 index 00000000..04b7ffcd Binary files /dev/null and b/source/fonts/fontello.woff differ diff --git a/templates/template.html b/templates/template.html index 8ac8a2ef..a42df254 100644 --- a/templates/template.html +++ b/templates/template.html @@ -13,7 +13,6 @@ $endif$ - @@ -55,7 +54,7 @@ $if(updated)$ $endif$ - + Zhiming Wang -- cgit v1.2.1