Skip to content

Commit

Permalink
refactor: switch from roboto font files contained in the sources to o…
Browse files Browse the repository at this point in the history
…nes provided via npm packages
  • Loading branch information
shauke committed Dec 12, 2019
1 parent 1db9463 commit 946a137
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 8 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ LICENSE
/charts/**/templates/*
*~
/.github
roboto.scss
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"ngx-toastr": "^10.2.0",
"rxjs": "~6.5.3",
"tslib": "^1.10.0",
"typeface-roboto": "0.0.75",
"typeface-roboto-condensed": "0.0.75",
"url-polyfill": "^1.1.7",
"zone.js": "~0.9.1"
},
Expand Down
38 changes: 30 additions & 8 deletions src/theme/global/fonts/roboto.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,53 @@
/* use Roboto fonts via https://github.com/KyleAMathews/typefaces NPM packages */

/* roboto-400normal - latin */
@font-face {
font-family: 'robotoregular';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('/assets/fonts/roboto/roboto-regular-webfont.woff') format('woff');
font-weight: 400;
src:
local('Roboto Regular '),
local('Roboto-Regular'),
url('~typeface-roboto/files/roboto-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
url('~typeface-roboto/files/roboto-latin-400.woff') format('woff'); /* Modern Browsers */
}

/* roboto-700normal - latin */
@font-face {
font-family: 'robotobold';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('/assets/fonts/roboto/roboto-bold-webfont.woff') format('woff');
font-weight: 700;
src:
local('Roboto Bold '),
local('Roboto-Bold'),
url('~typeface-roboto/files/roboto-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('~typeface-roboto/files/roboto-latin-700.woff') format('woff'); /* Modern Browsers */
}

/* roboto-condensed-400normal - latin */
@font-face {
font-family: 'roboto_condensedregular';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('/assets/fonts/roboto/robotocondensed-regular-webfont.woff') format('woff');
font-weight: 400;
src:
local('Roboto Condensed Regular '),
local('Roboto Condensed-Regular'),
url('~typeface-roboto-condensed/files/roboto-condensed-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
url('~typeface-roboto-condensed/files/roboto-condensed-latin-400.woff') format('woff'); /* Modern Browsers */
}

/* roboto-condensed-700normal - latin */
@font-face {
font-family: 'roboto_condensedbold';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('/assets/fonts/roboto/robotocondensed-bold-webfont.woff') format('woff');
font-weight: 700;
src:
local('Roboto Condensed Bold '),
local('Roboto Condensed-Bold'),
url('~typeface-roboto-condensed/files/roboto-condensed-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
url('~typeface-roboto-condensed/files/roboto-condensed-latin-700.woff') format('woff'); /* Modern Browsers */
}

0 comments on commit 946a137

Please sign in to comment.