Skip to content

Commit

Permalink
Only use woff2 for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jun 6, 2018
1 parent 96bb360 commit fa40cbc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
3 changes: 1 addition & 2 deletions client/src/sass/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
$icon-font-path: '../../node_modules/bootstrap-sass/assets/fonts/bootstrap/';
@import '_bootstrap';

$FontPathSourceSansPro: '../../node_modules/npm-font-source-sans-pro/fonts';
@import '~npm-font-source-sans-pro/source-sans-pro';
@import '_fonts';

@import '~primeng/resources/themes/bootstrap/theme.css';
@import '~primeng/resources/primeng.css';
Expand Down
41 changes: 41 additions & 0 deletions client/src/sass/include/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$FontPathSourceSansPro: '../../node_modules/npm-font-source-sans-pro/fonts';

@font-face {
font-family: 'Source Sans Pro';
font-weight: 400;
font-style: normal;
font-stretch: normal;
src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Regular.ttf.woff2') format('woff2'),
}

@font-face {
font-family: 'Source Sans Pro';
font-weight: 400;
font-style: italic;
font-stretch: normal;
src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-It.ttf.woff2') format('woff2'),
}

@font-face {
font-family: 'Source Sans Pro';
font-weight: 600;
font-style: normal;
font-stretch: normal;
src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Semibold.ttf.woff2') format('woff2'),
}

@font-face {
font-family: 'Source Sans Pro';
font-weight: 600;
font-style: italic;
font-stretch: normal;
src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-SemiboldIt.ttf.woff2') format('woff2'),
}

@font-face {
font-family: 'Source Sans Pro';
font-weight: 700;
font-style: normal;
font-stretch: normal;
src: url('#{$FontPathSourceSansPro}/WOFF2/TTF/SourceSansPro-Bold.ttf.woff2') format('woff2'),
}

0 comments on commit fa40cbc

Please sign in to comment.