Skip to content

Commit

Permalink
webfonts: proper fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adrientetar committed Jul 8, 2014
1 parent bfe4ddf commit 4d5f4ff
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ src/etc/pkg/rust-logo.ico binary
src/etc/pkg/rust-logo.png binary
src/rt/msvc/* -whitespace
src/rt/valgrind/* -whitespace
*.woff binary
14 changes: 7 additions & 7 deletions src/doc/rust.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 400;
src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: italic;
font-weight: 400;
src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
src: url("Heuristica-Italic.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 700;
src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
}

*:not(body) {
Expand All @@ -52,7 +52,7 @@
body {
margin: 0 auto;
padding: 0 15px;
font-family: "Heuristica", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
color: #333;
line-height: 1.428571429;
Expand Down
8 changes: 4 additions & 4 deletions src/librustdoc/html/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,12 @@ fn write_shared(cx: &Context,
include_bin!("static/FiraSans-Regular.woff")));
try!(write(cx.dst.join("FiraSans-Medium.woff"),
include_bin!("static/FiraSans-Medium.woff")));
try!(write(cx.dst.join("Heuristica-Regular.woff"),
include_bin!("static/Heuristica-Regular.woff")));
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
include_bin!("static/SourceSerifPro-Bold.woff")));
try!(write(cx.dst.join("Heuristica-Italic.woff"),
include_bin!("static/Heuristica-Italic.woff")));
try!(write(cx.dst.join("Heuristica-Bold.woff"),
include_bin!("static/Heuristica-Bold.woff")));
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
include_bin!("static/SourceSerifPro-Bold.woff")));

fn collect(path: &Path, krate: &str,
key: &str) -> io::IoResult<Vec<String>> {
Expand Down
Binary file removed src/librustdoc/html/static/Heuristica-Bold.woff
Binary file not shown.
Binary file removed src/librustdoc/html/static/Heuristica-Regular.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 7 additions & 7 deletions src/librustdoc/html/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@
src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 400;
src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
src: local('Source Serif Pro'), url("SourceSerifPro-Regular.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: italic;
font-weight: 400;
src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
src: url("Heuristica-Italic.woff") format('woff');
}
@font-face {
font-family: 'Heuristica';
font-family: 'Source Serif Pro';
font-style: normal;
font-weight: 700;
src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
}

@import "normalize.css";
Expand All @@ -53,7 +53,7 @@
body {
color: #333;
min-width: 500px;
font: 15.5px/1.4 "Heuristica", "Helvetica Neue", Helvetica, Arial, sans-serif;
font: 16px/1.4 "Source Serif Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0;
position: relative;
padding: 10px 15px 20px 15px;
Expand Down

0 comments on commit 4d5f4ff

Please sign in to comment.