webfonts: serve Source Code Pro locally
So that we have freestanding docs.
This commit is contained in:
parent
4d5f4ff5e9
commit
3b0b7b6b91
7 changed files with 22 additions and 4 deletions
|
@ -1,3 +1 @@
|
||||||
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
|
<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
|
||||||
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400'
|
|
||||||
rel='stylesheet' type='text/css'>
|
|
||||||
|
|
|
@ -40,6 +40,12 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
|
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
|
||||||
}
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
*:not(body) {
|
*:not(body) {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
|
|
|
@ -42,8 +42,6 @@ r##"<!DOCTYPE html>
|
||||||
|
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
|
|
||||||
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600'
|
|
||||||
rel='stylesheet' type='text/css'>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{root_path}main.css">
|
<link rel="stylesheet" type="text/css" href="{root_path}main.css">
|
||||||
|
|
||||||
{favicon}
|
{favicon}
|
||||||
|
|
|
@ -484,6 +484,10 @@ fn write_shared(cx: &Context,
|
||||||
include_bin!("static/Heuristica-Italic.woff")));
|
include_bin!("static/Heuristica-Italic.woff")));
|
||||||
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
|
try!(write(cx.dst.join("SourceSerifPro-Bold.woff"),
|
||||||
include_bin!("static/SourceSerifPro-Bold.woff")));
|
include_bin!("static/SourceSerifPro-Bold.woff")));
|
||||||
|
try!(write(cx.dst.join("SourceCodePro-Regular.woff"),
|
||||||
|
include_bin!("static/SourceCodePro-Regular.woff")));
|
||||||
|
try!(write(cx.dst.join("SourceCodePro-Semibold.woff"),
|
||||||
|
include_bin!("static/SourceCodePro-Semibold.woff")));
|
||||||
|
|
||||||
fn collect(path: &Path, krate: &str,
|
fn collect(path: &Path, krate: &str,
|
||||||
key: &str) -> io::IoResult<Vec<String>> {
|
key: &str) -> io::IoResult<Vec<String>> {
|
||||||
|
|
BIN
src/librustdoc/html/static/SourceCodePro-Regular.woff
Normal file
BIN
src/librustdoc/html/static/SourceCodePro-Regular.woff
Normal file
Binary file not shown.
BIN
src/librustdoc/html/static/SourceCodePro-Semibold.woff
Normal file
BIN
src/librustdoc/html/static/SourceCodePro-Semibold.woff
Normal file
Binary file not shown.
|
@ -39,6 +39,18 @@
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
|
src: local('Source Serif Pro Bold'), url("SourceSerifPro-Bold.woff") format('woff');
|
||||||
}
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: local('Source Code Pro'), url("SourceCodePro-Regular.woff") format('woff');
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
src: local('Source Code Pro Semibold'), url("SourceCodePro-Semibold.woff") format('woff');
|
||||||
|
}
|
||||||
|
|
||||||
@import "normalize.css";
|
@import "normalize.css";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue