Skip to content

Commit 6c62b40

Browse files
authored
Merge pull request readthedocs#612 from rtfd/davidfischer/native-code-font-stack
Switch to a native code font stack
2 parents 5f9ec36 + 23094a4 commit 6c62b40

File tree

9 files changed

+109
-129
lines changed

9 files changed

+109
-129
lines changed

Gruntfile.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ module.exports = function(grunt) {
4646
'bower_components/robotoslab-googlefont/RobotoSlab-Regular.ttf'],
4747
dest: 'sphinx_rtd_theme/static/fonts/',
4848
filter: 'isFile'
49-
},
50-
{
51-
expand: true,
52-
flatten: true,
53-
src: ['bower_components/inconsolata-googlefont/Inconsolata-Bold.ttf',
54-
'bower_components/inconsolata-googlefont/Inconsolata-Regular.ttf'],
55-
dest: 'sphinx_rtd_theme/static/fonts/',
56-
filter: 'isFile'
5749
}
5850
]
5951
}

OFL-License.txt

Lines changed: 102 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,102 @@
1-
sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf
2-
sphinx_rtd_theme/static/fonts/Lato-Bold.ttf
3-
sphinx_rtd_theme/static/fonts/Inconsolata.ttf
4-
sphinx_rtd_theme/static/fonts/Lato-Regular.ttf
5-
6-
7-
8-
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
9-
with Reserved Font Name <Reserved Font Name>.
10-
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
11-
with Reserved Font Name <additional Reserved Font Name>.
12-
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
13-
14-
This Font Software is licensed under the SIL Open Font License, Version 1.1.
15-
This license is copied below, and is also available with a FAQ at:
16-
http://scripts.sil.org/OFL
17-
18-
19-
-----------------------------------------------------------
20-
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
21-
-----------------------------------------------------------
22-
23-
PREAMBLE
24-
The goals of the Open Font License (OFL) are to stimulate worldwide
25-
development of collaborative font projects, to support the font creation
26-
efforts of academic and linguistic communities, and to provide a free and
27-
open framework in which fonts may be shared and improved in partnership
28-
with others.
29-
30-
The OFL allows the licensed fonts to be used, studied, modified and
31-
redistributed freely as long as they are not sold by themselves. The
32-
fonts, including any derivative works, can be bundled, embedded,
33-
redistributed and/or sold with any software provided that any reserved
34-
names are not used by derivative works. The fonts and derivatives,
35-
however, cannot be released under any other type of license. The
36-
requirement for fonts to remain under this license does not apply
37-
to any document created using the fonts or their derivatives.
38-
39-
DEFINITIONS
40-
"Font Software" refers to the set of files released by the Copyright
41-
Holder(s) under this license and clearly marked as such. This may
42-
include source files, build scripts and documentation.
43-
44-
"Reserved Font Name" refers to any names specified as such after the
45-
copyright statement(s).
46-
47-
"Original Version" refers to the collection of Font Software components as
48-
distributed by the Copyright Holder(s).
49-
50-
"Modified Version" refers to any derivative made by adding to, deleting,
51-
or substituting -- in part or in whole -- any of the components of the
52-
Original Version, by changing formats or by porting the Font Software to a
53-
new environment.
54-
55-
"Author" refers to any designer, engineer, programmer, technical
56-
writer or other person who contributed to the Font Software.
57-
58-
PERMISSION & CONDITIONS
59-
Permission is hereby granted, free of charge, to any person obtaining
60-
a copy of the Font Software, to use, study, copy, merge, embed, modify,
61-
redistribute, and sell modified and unmodified copies of the Font
62-
Software, subject to the following conditions:
63-
64-
1) Neither the Font Software nor any of its individual components,
65-
in Original or Modified Versions, may be sold by itself.
66-
67-
2) Original or Modified Versions of the Font Software may be bundled,
68-
redistributed and/or sold with any software, provided that each copy
69-
contains the above copyright notice and this license. These can be
70-
included either as stand-alone text files, human-readable headers or
71-
in the appropriate machine-readable metadata fields within text or
72-
binary files as long as those fields can be easily viewed by the user.
73-
74-
3) No Modified Version of the Font Software may use the Reserved Font
75-
Name(s) unless explicit written permission is granted by the corresponding
76-
Copyright Holder. This restriction only applies to the primary font name as
77-
presented to the users.
78-
79-
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
80-
Software shall not be used to promote, endorse or advertise any
81-
Modified Version, except to acknowledge the contribution(s) of the
82-
Copyright Holder(s) and the Author(s) or with their explicit written
83-
permission.
84-
85-
5) The Font Software, modified or unmodified, in part or in whole,
86-
must be distributed entirely under this license, and must not be
87-
distributed under any other license. The requirement for fonts to
88-
remain under this license does not apply to any document created
89-
using the Font Software.
90-
91-
TERMINATION
92-
This license becomes null and void if any of the above conditions are
93-
not met.
94-
95-
DISCLAIMER
96-
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
97-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
98-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
99-
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
100-
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
101-
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
102-
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
103-
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
104-
OTHER DEALINGS IN THE FONT SOFTWARE.
1+
sphinx_rtd_theme/static/fonts/Lato-Bold.ttf
2+
sphinx_rtd_theme/static/fonts/Lato-Regular.ttf
3+
4+
5+
6+
Copyright (c) <dates>, <Copyright Holder> (<URL|email>),
7+
with Reserved Font Name <Reserved Font Name>.
8+
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>),
9+
with Reserved Font Name <additional Reserved Font Name>.
10+
Copyright (c) <dates>, <additional Copyright Holder> (<URL|email>).
11+
12+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
13+
This license is copied below, and is also available with a FAQ at:
14+
http://scripts.sil.org/OFL
15+
16+
17+
-----------------------------------------------------------
18+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
19+
-----------------------------------------------------------
20+
21+
PREAMBLE
22+
The goals of the Open Font License (OFL) are to stimulate worldwide
23+
development of collaborative font projects, to support the font creation
24+
efforts of academic and linguistic communities, and to provide a free and
25+
open framework in which fonts may be shared and improved in partnership
26+
with others.
27+
28+
The OFL allows the licensed fonts to be used, studied, modified and
29+
redistributed freely as long as they are not sold by themselves. The
30+
fonts, including any derivative works, can be bundled, embedded,
31+
redistributed and/or sold with any software provided that any reserved
32+
names are not used by derivative works. The fonts and derivatives,
33+
however, cannot be released under any other type of license. The
34+
requirement for fonts to remain under this license does not apply
35+
to any document created using the fonts or their derivatives.
36+
37+
DEFINITIONS
38+
"Font Software" refers to the set of files released by the Copyright
39+
Holder(s) under this license and clearly marked as such. This may
40+
include source files, build scripts and documentation.
41+
42+
"Reserved Font Name" refers to any names specified as such after the
43+
copyright statement(s).
44+
45+
"Original Version" refers to the collection of Font Software components as
46+
distributed by the Copyright Holder(s).
47+
48+
"Modified Version" refers to any derivative made by adding to, deleting,
49+
or substituting -- in part or in whole -- any of the components of the
50+
Original Version, by changing formats or by porting the Font Software to a
51+
new environment.
52+
53+
"Author" refers to any designer, engineer, programmer, technical
54+
writer or other person who contributed to the Font Software.
55+
56+
PERMISSION & CONDITIONS
57+
Permission is hereby granted, free of charge, to any person obtaining
58+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
59+
redistribute, and sell modified and unmodified copies of the Font
60+
Software, subject to the following conditions:
61+
62+
1) Neither the Font Software nor any of its individual components,
63+
in Original or Modified Versions, may be sold by itself.
64+
65+
2) Original or Modified Versions of the Font Software may be bundled,
66+
redistributed and/or sold with any software, provided that each copy
67+
contains the above copyright notice and this license. These can be
68+
included either as stand-alone text files, human-readable headers or
69+
in the appropriate machine-readable metadata fields within text or
70+
binary files as long as those fields can be easily viewed by the user.
71+
72+
3) No Modified Version of the Font Software may use the Reserved Font
73+
Name(s) unless explicit written permission is granted by the corresponding
74+
Copyright Holder. This restriction only applies to the primary font name as
75+
presented to the users.
76+
77+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
78+
Software shall not be used to promote, endorse or advertise any
79+
Modified Version, except to acknowledge the contribution(s) of the
80+
Copyright Holder(s) and the Author(s) or with their explicit written
81+
permission.
82+
83+
5) The Font Software, modified or unmodified, in part or in whole,
84+
must be distributed entirely under this license, and must not be
85+
distributed under any other license. The requirement for fonts to
86+
remain under this license does not apply to any document created
87+
using the Font Software.
88+
89+
TERMINATION
90+
This license becomes null and void if any of the above conditions are
91+
not met.
92+
93+
DISCLAIMER
94+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
95+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
96+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
97+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
98+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
99+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
100+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
101+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
102+
OTHER DEALINGS IN THE FONT SOFTWARE.

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"dependencies": {
3232
"lato-googlefont": "*",
3333
"robotoslab-googlefont": "*",
34-
"inconsolata-googlefont": "*",
3534
"font-awesome": "~4.7"
3635
},
3736
"resolutions": {

docs/changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ New Features
1212
Fixes
1313
-----
1414

15-
* Fix small styling issues
16-
1715
Other Changes
1816
--------------
1917

18+
* Changed code and literals to use a native font stack (#612)
19+
* Fix small styling issues
2020

2121
v0.3.1
2222
======

sass/_theme_font_local.sass

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
@font-face
2-
font-family: 'Inconsolata'
3-
font-style: normal
4-
font-weight: 400
5-
src: local('Inconsolata'), local('Inconsolata-Regular'), url(../fonts/Inconsolata-Regular.ttf) format('truetype')
6-
7-
@font-face
8-
font-family: 'Inconsolata'
9-
font-style: normal
10-
font-weight: 700
11-
src: local('Inconsolata Bold'), local('Inconsolata-Bold'), url(../fonts/Inconsolata-Bold.ttf) format('truetype')
12-
131
@font-face
142
font-family: 'Lato'
153
font-style: normal

sass/_theme_rst.sass

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
white-space: pre
7777
margin: 0
7878
padding: $base-line-height / 2 $base-line-height / 2
79-
font-family: $code-font-family
8079
display: block
8180
overflow: auto
8281
& .hll
@@ -85,6 +84,7 @@
8584
margin: 0 -1 * $base-line-height / 2
8685
padding: 0 $base-line-height / 2
8786
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
87+
font-family: $code-font-family
8888
font-size: 12px
8989
line-height: normal
9090

@@ -269,6 +269,7 @@
269269
tt, code
270270
@extend code
271271
color: $black
272+
font-family: $code-font-family
272273
padding: 2px 5px
273274
big, em
274275
font-size: 100% !important
@@ -279,6 +280,8 @@
279280
&.xref, a &
280281
font-weight: bold
281282
color: $text-codexref-color
283+
pre, kbd, samp
284+
font-family: $code-font-family
282285
// If the literal is inside an a tag, let's color it like a link
283286
a tt, a code
284287
color: $link-color

sass/_theme_variables.sass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ $highlight-color: $yellow
6363
$base-font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif
6464
$custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif
6565
$custom-font-family2: Georgia, serif
66-
$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
66+
$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace
-106 KB
Binary file not shown.
-93.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)