diff --git a/Gruntfile.js b/Gruntfile.js index 10cfc745..0ea4d640 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -49,14 +49,6 @@ module.exports = function(grunt) { 'bower_components/robotoslab-googlefont/RobotoSlab-Regular.ttf'], dest: 'sphinx_rtd_theme/static/fonts/', filter: 'isFile' - }, - { - expand: true, - flatten: true, - src: ['bower_components/inconsolata-googlefont/Inconsolata-Bold.ttf', - 'bower_components/inconsolata-googlefont/Inconsolata-Regular.ttf'], - dest: 'sphinx_rtd_theme/static/fonts/', - filter: 'isFile' } ] } diff --git a/OFL-License.txt b/OFL-License.txt index ae73950a..56c7ea6d 100644 --- a/OFL-License.txt +++ b/OFL-License.txt @@ -1,104 +1,102 @@ -sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf -sphinx_rtd_theme/static/fonts/Lato-Bold.ttf -sphinx_rtd_theme/static/fonts/Inconsolata.ttf -sphinx_rtd_theme/static/fonts/Lato-Regular.ttf - - - -Copyright (c) , (), -with Reserved Font Name . -Copyright (c) , (), -with Reserved Font Name . -Copyright (c) , (). - -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. +sphinx_rtd_theme/static/fonts/Lato-Bold.ttf +sphinx_rtd_theme/static/fonts/Lato-Regular.ttf + + + +Copyright (c) , (), +with Reserved Font Name . +Copyright (c) , (), +with Reserved Font Name . +Copyright (c) , (). + +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/bower.json b/bower.json index 37bd721b..69bcc75f 100644 --- a/bower.json +++ b/bower.json @@ -31,7 +31,6 @@ "dependencies": { "lato-googlefont": "*", "robotoslab-googlefont": "*", - "inconsolata-googlefont": "*", "font-awesome": "~4.7" }, "resolutions": { diff --git a/docs/changelog.rst b/docs/changelog.rst index 1bdc49e0..6bed3e01 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,6 +16,8 @@ Other Changes -------------- * Write theme version and build date at top of JavaScript and CSS +* Changed code and literals to use a native font stack (#612) +* Fix small styling issues v0.3.1 ====== diff --git a/js/theme.js b/js/theme.js index af2d4f01..f0cbedf6 100644 --- a/js/theme.js +++ b/js/theme.js @@ -22,7 +22,7 @@ function ThemeNav () { // out from the RTD assets. This just ensures old projects that are // calling `enable()` get the sticky menu on by default. All other cals // to `enable` should include an argument for enabling the sticky menu. - if (typeof(withStickNav) == 'undefined') { + if (typeof(withStickyNav) == 'undefined') { withStickyNav = true; } diff --git a/sass/_theme_font_local.sass b/sass/_theme_font_local.sass index 0e02343c..13d350e3 100644 --- a/sass/_theme_font_local.sass +++ b/sass/_theme_font_local.sass @@ -1,15 +1,3 @@ -@font-face - font-family: 'Inconsolata' - font-style: normal - font-weight: 400 - src: local('Inconsolata'), local('Inconsolata-Regular'), url(../fonts/Inconsolata-Regular.ttf) format('truetype') - -@font-face - font-family: 'Inconsolata' - font-style: normal - font-weight: 700 - src: local('Inconsolata Bold'), local('Inconsolata-Bold'), url(../fonts/Inconsolata-Bold.ttf) format('truetype') - @font-face font-family: 'Lato' font-style: normal diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass index 9293dc16..9334d417 100644 --- a/sass/_theme_rst.sass +++ b/sass/_theme_rst.sass @@ -76,7 +76,6 @@ white-space: pre margin: 0 padding: $base-line-height / 2 $base-line-height / 2 - font-family: $code-font-family display: block overflow: auto & .hll @@ -85,6 +84,7 @@ margin: 0 -1 * $base-line-height / 2 padding: 0 $base-line-height / 2 pre.literal-block, div[class^='highlight'] pre, .linenodiv pre + font-family: $code-font-family font-size: 12px line-height: normal @@ -132,6 +132,7 @@ .line-block margin-left: 0px margin-bottom: $base-line-height + line-height: $base-line-height .line-block .line-block margin-left: $base-line-height margin-bottom: 0px @@ -246,6 +247,9 @@ border-color: $table-border-color &:not(.field-list) @extend .wy-table-striped + // Remove bottom margin for the last element (and it's last child) + td .last, td .last :last-child + margin-bottom: 0 // This table is what gets spit out for auto-generated API stuff. I style it smaller bits of padding. table.field-list @extend .wy-table @@ -265,6 +269,7 @@ tt, code @extend code color: $black + font-family: $code-font-family padding: 2px 5px big, em font-size: 100% !important @@ -275,6 +280,8 @@ &.xref, a & font-weight: bold color: $text-codexref-color + pre, kbd, samp + font-family: $code-font-family // If the literal is inside an a tag, let's color it like a link a tt, a code color: $link-color @@ -282,12 +289,14 @@ margin-bottom: $base-line-height dt font-weight: bold + margin-bottom: $base-line-height / 2 // Most of the content within these dls are one liners, so I halve the normal margins. p, table, ul, ol margin-bottom: $base-line-height / 2 !important // rST seems to want dds to be treated as the browser would, indented. dd margin: 0 0 $base-line-height / 2 $base-line-height + line-height: $base-line-height // This is what Sphinx spits out for it's autodocs. Depending upon what language the person is referencing // these things usually have a class of "method" or "class" or something similar, but really who knows. // Sphinx doesn't give me a generic class on these, so unfortunately I have to apply it to the root dl. diff --git a/sass/_theme_variables.sass b/sass/_theme_variables.sass index 79630b41..9a7354ff 100644 --- a/sass/_theme_variables.sass +++ b/sass/_theme_variables.sass @@ -63,4 +63,4 @@ $highlight-color: $yellow $base-font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif $custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif $custom-font-family2: Georgia, serif -$code-font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace +$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace diff --git a/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf b/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf deleted file mode 100644 index 9addc892..00000000 Binary files a/sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf and /dev/null differ diff --git a/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf b/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf deleted file mode 100644 index 592ccd20..00000000 Binary files a/sphinx_rtd_theme/static/fonts/Inconsolata-Regular.ttf and /dev/null differ