Skip to content

Commit

Permalink
fix(script+docs): review the generator script, update the readme file (
Browse files Browse the repository at this point in the history
…#6)

- [x] add wget to the function that installs apt packages used by the generator;
- [x] update instructions in the readme file in the project root;
- [x] bump the package version;
  • Loading branch information
rfprod authored Dec 27, 2021
1 parent af025b8 commit 854933e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

This is `NOT` a fork of the [material design icons](https://github.com/google/material-design-icons) by Google, including only the font files for smaller distribution.

This is a generator script which fetches iconfont from the [original material design icons repo](https://github.com/google/material-design-icons), converts `otf` fonts to `woff`, and makes it possible to use self-hosted version of the latest material design icons for web.

Fonts can be generated locally if this repo is cloned.
This is a generator script which fetches the iconfont from the [original material design icons repo](https://github.com/google/material-design-icons), converts `otf` fonts to `woff`, and makes it possible to use the self-hosted version of the latest material design icons for web.

## Local script usage

Expand All @@ -24,9 +22,9 @@ Material design icons are the official [icon set](http://www.google.com/design/s

Read the [developer guide](http://google.github.io/material-design-icons/) on how to use the material design icons in your project.

### Using a font collection (recommended way as per Google)
### Using the font collection (recommended way as per Google)

The `iconfont` folder contains pre-generated font files that can be included in a project. This is especially convenient for the web; however, it is generally better to link to the web font hosted on Google Fonts:
The `iconfont` folder contains pre-generated font files that can be included in a project. This is especially convenient for the web. However, it is generally better to link to the web font hosted on Google Fonts:

```html
<link
Expand All @@ -35,21 +33,23 @@ The `iconfont` folder contains pre-generated font files that can be included in
/>
```

### Using self-hosted version
### Using the self-hosted version

Install package.
Install the package. Exexute

```bash
npm i --save-dev material-design-icon-fonts-self-hosted-web
```

or

```bash
yarn add -D material-design-icon-fonts-self-hosted-web
```

#### Angular

Add to the `styles` array of a corresponding app in `angular.json`
Add one of the folowing `css` files to the `styles` array of a corresponding app in `angular.json` depending on which version of the icons are intended to be used in the app.

##### Regular

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-design-icon-fonts-self-hosted-web",
"version": "1.0.2",
"version": "1.0.3",
"description": "Self-hosted version generator of Google Material Design icon fonts for web apps.",
"keywords": [
"icons",
Expand Down
6 changes: 3 additions & 3 deletions src/generate-iconfont.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ MATERIAL_ICONS_TWOTONE_REGULAR_WOFF2_DIST="./iconfont/MaterialIconsTwoTone-Regul
# - eot-utils (https://manpages.debian.org/stretch/eot-utils/)
# - eot2ttf (https://packages.debian.org/stretch/fonts/eot2ttf)
# - woff2 (https://packages.debian.org/buster/woff2)
# - wget (https://www.gnu.org/software/wget/)
##
installTools() {
sudo apt install woff2
sudo apt install eot-utils
sudo apt install woff2 eot-utils wget
}

##
Expand All @@ -61,7 +61,7 @@ downloadSourceFonts() {

##
# Converts source fonts to woff2.
# Copies source source ttf fonts to
# Copies source source ttf fonts to the ./iconfont directory.
##
createFontsDist() {
# regular
Expand Down

0 comments on commit 854933e

Please sign in to comment.