Skip to content

Commit 28d5df5

Browse files
Moved offline fonts usage to a separate *Note* section.
1 parent c7eeddc commit 28d5df5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ $ cd my-project
1111
$ npm i --save-dev carbon-components-angular carbon-components @ngx-translate/core
1212
```
1313

14-
Then we need to include carbon-components in `src/styles.scss` and set our fonts path:
14+
Then we need to include carbon-components in `src/styles.scss`:
1515

1616
```scss
17-
$font-path: '/assets/fonts/';
1817
@import "~carbon-components/scss/globals/scss/styles.scss";
1918
```
2019

21-
And copy the fonts files from `node_modules/carbon-components/src/globals/fonts` into our app's `assets/fonts` folder.
20+
> *Note:* For offline usage we'll need to set `$font-path: '~carbon-components/src/globals/fonts';` at the very top of our `src/styles.scss`. This will copy the fonts to our `dist` folder upon successful build. If you like the fonts to be a part of your `assets` folder and not polute the `dist` folder then copy the fonts from `node_modules/carbon-components/src/globals/fonts` into our app's `src/assets/fonts` folder and add `$font-path: '/assets/fonts/';` at the very top of our `src/styles.scss`.
2221
2322
Then set up our translations in `src/app/app.module.ts`:
2423

0 commit comments

Comments
 (0)