From fa40cbc3b26e2a7b01a6273def62fa8bb552c7b6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 6 Jun 2018 19:21:02 +0200 Subject: [PATCH] Only use woff2 for fonts --- client/src/sass/application.scss | 3 +-- client/src/sass/include/_fonts.scss | 41 +++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 client/src/sass/include/_fonts.scss diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index 8331c9fa3..850fd1d0b 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -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'; diff --git a/client/src/sass/include/_fonts.scss b/client/src/sass/include/_fonts.scss new file mode 100644 index 000000000..61717e6f5 --- /dev/null +++ b/client/src/sass/include/_fonts.scss @@ -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'), +} \ No newline at end of file -- 2.25.1