diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2016-01-08 17:42:32 -0800 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2016-01-08 17:42:32 -0800 |
commit | 09ba859d9a6f95db49ef923395ea457b64439290 (patch) | |
tree | dea03dcbdc6af49c3e3c6d9933edc16b1e6b5016 /source | |
parent | 7db0f99db806560475be747f720986cbef4b4d4b (diff) | |
download | my_new_personal_website-09ba859d9a6f95db49ef923395ea457b64439290.tar.xz my_new_personal_website-09ba859d9a6f95db49ef923395ea457b64439290.zip |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/css/fonts.css | 70 | ||||
-rw-r--r-- | source/css/theme.css | 30 | ||||
-rw-r--r-- | source/fonts/fontello.eot | bin | 0 -> 5152 bytes | |||
-rw-r--r-- | source/fonts/fontello.svg | 13 | ||||
-rw-r--r-- | source/fonts/fontello.ttf | bin | 0 -> 4984 bytes | |||
-rw-r--r-- | source/fonts/fontello.woff | bin | 0 -> 2872 bytes |
6 files changed, 40 insertions, 73 deletions
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 Binary files differnew file mode 100644 index 00000000..9f5d486b --- /dev/null +++ b/source/fonts/fontello.eot 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 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg"> +<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata> +<defs> +<font id="fontello" horiz-adv-x="1000" > +<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" /> +<missing-glyph horiz-adv-x="1000" /> +<glyph glyph-name="rss" unicode="" d="m0 730q314 0 537-223t223-537l-118 0q0 266-188 453t-454 187l0 120z m0-238q218 0 371-153t153-369l-118 0q0 166-119 285t-287 119l0 118z m114-296q46 0 80-33t34-81q0-46-34-79t-80-33-80 33-34 79q0 48 34 81t80 33z" horiz-adv-x="760" /> +<glyph glyph-name="cc" unicode="" d="m474 830q198 2 340-136t146-336q2-200-136-342t-338-146q-198-2-341 137t-145 337q-4 200 135 342t339 144z m12-858q156 2 266 114t108 270-115 267-269 107q-158-2-267-114t-107-270 114-267 270-107z m-124 298q40 0 58 40l56-30q-20-36-50-52-32-20-70-20-62 0-100 38-38 36-38 104t38 106 96 38q86 0 124-66l-62-32q-10 20-24 28t-28 8q-60 0-60-82 0-38 14-58 18-22 46-22z m266 0q42 0 56 40l58-30q-18-32-50-52t-70-20q-64 0-100 38-38 36-38 104 0 64 38 106 38 38 98 38 84 0 120-66l-60-32q-10 20-24 28t-28 8q-62 0-62-82 0-36 16-58t46-22z" horiz-adv-x="960" /> +</font> +</defs> +</svg>
\ No newline at end of file diff --git a/source/fonts/fontello.ttf b/source/fonts/fontello.ttf Binary files differnew file mode 100644 index 00000000..4b372c14 --- /dev/null +++ b/source/fonts/fontello.ttf diff --git a/source/fonts/fontello.woff b/source/fonts/fontello.woff Binary files differnew file mode 100644 index 00000000..04b7ffcd --- /dev/null +++ b/source/fonts/fontello.woff |