diff --git a/bootstrap b/bootstrap index a41c9f8..3217021 100755 --- a/bootstrap +++ b/bootstrap @@ -22,11 +22,11 @@ set -euo pipefail -# Source fonts and license (SIL Open Font License 1.1) -declare -ra fonts=( - https://github.com/adobe-fonts/source-sans-pro/raw/c7ea228c8cd66f65dac985bef98fda12c9cfa713/WOFF/OTF/SourceSansPro-Light.otf.woff - https://github.com/adobe-fonts/source-sans-pro/raw/c7ea228c8cd66f65dac985bef98fda12c9cfa713/WOFF/OTF/SourceSansPro-Regular.otf.woff - https://github.com/adobe-fonts/source-sans-pro/raw/c7ea228c8cd66f65dac985bef98fda12c9cfa713/LICENSE.txt +# Source fonts (Apache 2.0) +declare -rA fonts=( + [OpenSans-Regular.woff]=https://fonts.gstatic.com/s/opensans/v15/mem8YaGs126MiZpBA-UFVZ0d.woff + [OpenSans-Light.woff]=https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UN_r8OUuhv.woff + [OpenSans-SemiBold.woff]=https://fonts.gstatic.com/s/opensans/v15/mem5YaGs126MiZpBA-UNirkOUuhv.woff ) declare -r tpimagesdir=images/tp @@ -48,14 +48,15 @@ get-images() # Download and verify fonts and license. get-fonts() { - local font dest + local font src dest echo 'retrieving font files...' - for font in "${fonts[@]}"; do - dest="$fontdir/$( basename "$font" )" + for font in "${!fonts[@]}"; do + src=${fonts[$font]} + dest="$fontdir/$font" test ! -f "$dest" || continue - torify wget "$font" -O "$dest" + torify wget "$src" -O "$dest" done # Verify that we haven't been served bad files. This should only happen diff --git a/build-aux/lsfonts b/build-aux/lsfonts index 652615e..78df9d6 100755 --- a/build-aux/lsfonts +++ b/build-aux/lsfonts @@ -17,6 +17,6 @@ # along with this program. If not, see . ## -grep -A2 @font-face style.css \ +grep -A4 @font-face style.css \ | grep -o "fonts/[^']\+" diff --git a/fonts/LICENSE.txt b/fonts/LICENSE.txt deleted file mode 100644 index 87ec82c..0000000 --- a/fonts/LICENSE.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/fonts/OpenSans-Regular.ttf b/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..9d4e8e5 Binary files /dev/null and b/fonts/OpenSans-Regular.ttf differ diff --git a/fonts/OpenSans-Regular.woff b/fonts/OpenSans-Regular.woff new file mode 100644 index 0000000..e495e6f Binary files /dev/null and b/fonts/OpenSans-Regular.woff differ diff --git a/fonts/README b/fonts/README index 1b1fc1e..cd8b589 100644 --- a/fonts/README +++ b/fonts/README @@ -1 +1 @@ -Run bootstrap to retrieve fonts and license +Run bootstrap to retrieve fonts diff --git a/fonts/SHA512SUM b/fonts/SHA512SUM index cb047b5..80b09cd 100644 --- a/fonts/SHA512SUM +++ b/fonts/SHA512SUM @@ -1,3 +1,3 @@ -49a33ee66a091e2662e92d71c540bbf4a5ba9d7d42d756895d896f5da330c1c3c10d5edbafa81ca333b18c5c5de5c3ac993ca5c6b8a2652620cd9dd12a316b32 SourceSansPro-Light.otf.woff -d66af3a26a1a9713a701aceae0b3e69373f4741f4368c83585ff34586cdf55ddcfa15b67bf186c9eaaf21c91c285454f1ac7506271792be98bbb348cdcbf8718 SourceSansPro-Regular.otf.woff -8a9c50f8246cddd6b2da4ed34dc501e254bc66cda1d1593ef4c048c6f14616e6f7c43bc6e9d5aeb91a4d693bc9d1baa4d5db90655eecfe28437ae8b741c142ee LICENSE.txt +6b04f0f3e632637dd82b11064502b1036ea20e8824eb973b1b369cb3fbe823e35094764a72eb7fd5e76431131b88287e622055ffa71131d7dc609a2b0371311e OpenSans-Light.woff +5029c9d19e1cb91481cd8f23a90fdd3bdc0058dc36e9a29e1d5c808482806f359365b588b1ec0b9d22ae975eff9475ee662e93a0e3421961bd0620cb307d44d9 OpenSans-Regular.woff +9dbd69e362fe4144c686adc1c53e0d55efe9aa173c2402667559e14a4ed505a00fc6d5ac95b1e0259d26efb9b846c34034359e1d88148610ea5ce89d300d9008 OpenSans-SemiBold.woff diff --git a/style.css b/style.css index bba5f6c..74de06d 100644 --- a/style.css +++ b/style.css @@ -6,14 +6,23 @@ * Share-AlikeĀ 4.0 International license. */ -/* TODO: Good font stack to fall back on if user has fonts blocked. */ @font-face { - font-family: Source Sans Pro; - src: url('/fonts/SourceSansPro-Regular.otf.woff'); + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: local('Open Sans Regular'), local('OpenSans-Regular'), url('/fonts/OpenSans-Regular.woff') format('woff'); } @font-face { - font-family: Source Sans Pro Light; - src: url('/fonts/SourceSansPro-Light.otf.woff'); + font-family: 'Open Sans'; + font-style: normal; + font-weight: 300; + src: local('Open Sans Light'), local('OpenSans-Light'), url('/fonts/OpenSans-Light.woff') format('woff'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'), url('/fonts/OpenSans-SemiBold.woff') format('woff'); } html { @@ -31,7 +40,7 @@ body { /*padding: 1em 5em;*/ text-align: justify; - font-family: 'Source Sans Pro', 'Liberation Sans', sans-serif; + font-family: 'Open Sans', sans-serif; } a { color: #0066cc; } @@ -220,7 +229,7 @@ header nav { padding: 0.15em 1em; } .menu li a:hover { - border-bottom: 0.3ex solid #2e3436; + border-bottom: 0.2ex solid #2e3436; } @@ -357,7 +366,7 @@ section.highlight aside { float: right; width: 40%; - font-family: 'Source Sans Pro Light'; + font-weight: 300; font-size: 0.9em; } @@ -473,7 +482,7 @@ br.end { } footer, footer h2 { - font-family: 'Source Sans Pro Light'; + font-weight: 300; } footer, #footer { font-size: 0.8em;