From 716472c9bdd2b2e80ddbd57495e2b03f67c7c978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Wolny?= Date: Sun, 11 Apr 2021 11:47:11 +0200 Subject: font compilation readme adjustments --- README.md | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 27b0f87c..84ceab2b 100644 --- a/README.md +++ b/README.md @@ -127,43 +127,47 @@ To load a specific version replace `latest` with the desired version number. ``` -Compiling fonts: +### Compiling fonts -To compile fonts first install [fontforge](https://fontforge.org/en-US/) +To compile fonts first install [fontforge](https://fontforge.org/en-US/). -When compiling the font it will look for a json file compile-options.json in root folder (same folder as the package.json) In this file you can define extra options: +When compiling the font it will look for a json file `compile-options.json` in root folder (same folder as the `package.json`) In this file you can define extra options: The default settings if you have not defined the file will be: +```JSON { "includeIcons": [], "fontForge": "fontforge", "strokeWidth": 2 } +``` -The fontforge executable needs to be in the path or you can set set the path to the downloaded fontforge executable in the. If you installed in on a mac in your application directory it will be "/Applications/FontForge.app/Contents/MacOS/FontForge". You can set this value in the compile-options.json file. +The fontforge executable needs to be in the path or you can set the path to the downloaded fontforge executable in the configuration file. If you installed in on a mac in your application directory it will be `/Applications/FontForge.app/Contents/MacOS/FontForge`. You can set this value in the `compile-options.json` file. ```JSON - { - "fontForge":"/Applications/FontForge.app/Contents/MacOS/FontForge" - } +{ + "fontForge":"/Applications/FontForge.app/Contents/MacOS/FontForge" +} ``` To compile the fonts run: - npm run build-iconfont +```sh +npm run build-iconfont +``` By default the stroke width is 2. You can change the stroke width in the compile-options.json ```JSON - { - "strokeWidth": 1.5, - } +{ + "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. To compile only two icons you can set for example the folowing option in the compile-options.json: +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. To compile only two icons you can set for example the folowing option in the `compile-options.json`: ```JSON - { - "includeIcons":["alert-octagon","alert-triangle"] - } +{ + "includeIcons":["alert-octagon","alert-triangle"] +} ``` ### Svelte -- cgit v1.2.1