webfonts: serve Source Code Pro locally

So that we have freestanding docs.
This commit is contained in:
Adrien Tétar 2014-07-08 20:26:23 +02:00
parent 4d5f4ff5e9
commit 3b0b7b6b91
7 changed files with 22 additions and 4 deletions

View file

@ -1,3 +1 @@
<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'>

View file

@ -40,6 +40,12 @@
font-weight: 700;
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) {
-webkit-box-sizing: border-box;

View file

@ -42,8 +42,6 @@ r##"<!DOCTYPE html>
<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">
{favicon}

View file

@ -484,6 +484,10 @@ fn write_shared(cx: &Context,
include_bin!("static/Heuristica-Italic.woff")));
try!(write(cx.dst.join("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,
key: &str) -> io::IoResult<Vec<String>> {

Binary file not shown.

Binary file not shown.

View file

@ -39,6 +39,18 @@
font-weight: 700;
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";