Skip to content

Commit b53f3e7

Browse files
committed
auto merge of #15530 : adrientetar/rust/proper-fonts, r=alexcrichton
- Treat WOFF as binary files so that git does not perform newline normalization. - Replace corrupt Heuristica files with Source Serif Pro — italics are [almost in production](adobe-fonts/source-serif#2) so I left Heuristica Italic which makes a good pair with SSP. Overall, Source Serif Pro is I think a better fit for rustdoc (cc @thehydroimpulse). This ought to fix #15527. - Store Source Code Pro locally in order to make offline docs freestanding. Fixes #14778. Preview: http://adrientetar.legtux.org/cached/rust-docs/core.html r? @alexcrichton
2 parents ad3eda1 + b7ef0cf commit b53f3e7

16 files changed

+427
-22
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
99
src/rt/msvc/* -whitespace
1010
src/rt/valgrind/* -whitespace
11+
*.woff binary

src/doc/favicon.inc

-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
2-
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400'
3-
rel='stylesheet' type='text/css'>

src/doc/rust.css

+13-7
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,28 @@
2323
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
2424
}
2525
@font-face {
26-
font-family: 'Heuristica';
26+
font-family: 'Source Serif Pro';
2727
font-style: normal;
2828
font-weight: 400;
29-
src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
29+
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
3030
}
3131
@font-face {
32-
font-family: 'Heuristica';
32+
font-family: 'Source Serif Pro';
3333
font-style: italic;
3434
font-weight: 400;
35-
src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
35+
src: url("Heuristica-Italic.woff") format('woff');
3636
}
3737
@font-face {
38-
font-family: 'Heuristica';
38+
font-family: 'Source Serif Pro';
3939
font-style: normal;
4040
font-weight: 700;
41-
src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
41+
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
42+
}
43+
@font-face {
44+
font-family: 'Source Code Pro';
45+
font-style: normal;
46+
font-weight: 400;
47+
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
4248
}
4349

4450
*:not(body) {
@@ -52,7 +58,7 @@
5258
body {
5359
margin: 0 auto;
5460
padding: 0 15px;
55-
font-family: "Heuristica", "Helvetica Neue", Helvetica, Arial, sans-serif;
61+
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
5662
font-size: 18px;
5763
color: #333;
5864
line-height: 1.428571429;

src/librustdoc/html/layout.rs

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ r##"<!DOCTYPE html>
4242
4343
<title>{title}</title>
4444
45-
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600'
46-
rel='stylesheet' type='text/css'>
4745
<link rel="stylesheet" type="text/css" href="{root_path}main.css">
4846
4947
{favicon}

src/librustdoc/html/render.rs

+8-4
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,16 @@ fn write_shared(cx: &Context,
478478
include_bin!("static/FiraSans-Regular.woff")));
479479
try!(write(cx.dst.join("FiraSans-Medium.woff"),
480480
include_bin!("static/FiraSans-Medium.woff")));
481-
try!(write(cx.dst.join("Heuristica-Regular.woff"),
482-
include_bin!("static/Heuristica-Regular.woff")));
481+
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
482+
include_bin!("static/SourceSerifPro-Bold.woff")));
483483
try!(write(cx.dst.join("Heuristica-Italic.woff"),
484484
include_bin!("static/Heuristica-Italic.woff")));
485-
try!(write(cx.dst.join("Heuristica-Bold.woff"),
486-
include_bin!("static/Heuristica-Bold.woff")));
485+
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
486+
include_bin!("static/SourceSerifPro-Bold.woff")));
487+
try!(write(cx.dst.join("SourceCodePro-Regular.woff"),
488+
include_bin!("static/SourceCodePro-Regular.woff")));
489+
try!(write(cx.dst.join("SourceCodePro-Semibold.woff"),
490+
include_bin!("static/SourceCodePro-Semibold.woff")));
487491

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

0 commit comments

Comments
 (0)