Skip to content

Commit

Permalink
use local font in place of cdn font:
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Sun committed Jul 20, 2016
1 parent 387bb8b commit 566c704
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
5 changes: 0 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,3 @@ ga: UA-65933410-1

# Copyright Infomation
startyear: 2015

# Font CDN
#true : use google fonts api, not stable for chinese visitor sometimes, caused by force majeure factor
#false: use useso fonts api instead of google's, great response speed for chinese visitor
googlefonts: true
4 changes: 0 additions & 4 deletions layout/partial/head.jade
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,3 @@ link(rel="stylesheet", href=url_for("css/apollo.css"))
- var xml = config.url + '/atom.xml'
link(rel="search", type="application/opensearchdescription+xml", href=xml, title=config.title)

if theme.googlefonts
link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600" type='text/css')
else
link(rel="stylesheet", href="http://fonts.useso.com/css?family=Source+Sans+Pro:400,600" type='text/css')
2 changes: 1 addition & 1 deletion source/css/apollo.css

Large diffs are not rendered by default.

Binary file added source/font/sourcesanspro.woff
Binary file not shown.
Binary file added source/font/sourcesanspro.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion source/scss/_partial/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body {
font-size: 15px;
line-height: 1.6;
background-color: #fff;
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
font-family: 'sourcesanspro', 'Helvetica Neue', Arial, sans-serif;
}

ul.nav,
Expand Down
10 changes: 9 additions & 1 deletion source/scss/apollo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@
@import "_partial/post";
@import "_partial/footer";
@import "_partial/mq";
@import "_partial/copyright";
@import "_partial/copyright";

@font-face {
font-family: 'sourcesanspro';
src: url('/font/sourcesanspro.woff2') format('woff2'),
url('/font/sourcesanspro.woff') format('woff');
font-weight: normal;
font-style: normal;
}

0 comments on commit 566c704

Please sign in to comment.