From e43988e4adac46b78753c90f49b92645d08d118d Mon Sep 17 00:00:00 2001 From: tijmenvangulik Date: Sun, 21 Mar 2021 18:29:46 +0100 Subject: Make it easier to compile a font with sub set of icons --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index c3d6acc2..8f50edd2 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,35 @@ To load a specific version replace `latest` with the desired version number. ``` +Compiling fonts: + +To compile fonts first install [fontforge](https://fontforge.org/en-US/) + +the fontforge executable needs to be in the path or you can set set the path to the downloaded fontforge executable in the package.json. If you installed in on a mac in your application directory it will be: +```JSON + "compileFonts": { + "fontForge":"/Applications/FontForge.app/Contents/MacOS/FontForge" + } +``` +To compile the fonts run: + npm run build-iconfont + +By default the stroke width is 2. You can change the stroke width by setting the package property: + +```JSON + "compileFonts": { + "strokeWidth":"1.5", + } +``` + +To reduce the font file size you can choose to compile a sub set of icons. When you leave the array empty it will compile all the fonts. For example: + +```JSON + "includeIcons": { + "include":["alert-octagon","alert-triangle"] + } +``` + ### Svelte You can use [`tabler-icons-svelte`](https://github.com/benflap/tabler-icons-svelte) to use icons in your Svelte projects (see [example](https://svelte.dev/repl/e80dc63d7019431692b10a77525e7f99?version=3.31.0)): -- cgit v1.2.1