aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md67
1 files changed, 67 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6133384e..f5366223 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,30 @@ const MyComponent = () => {
`@tabler/icons` exports it's own type declarations for usage with React and Typescript.
+### Vue
+
+Vue components available through [`vue-tabler-icons`](https://www.npmjs.com/package/vue-tabler-icons) package.
+Install the package, import the icon component and render it in your component. You can adjust SVG properties by passing regular HTML attributes:
+
+```html
+<script>
+ // MyComponent.vue
+ import { BoldIcon } from 'vue-tabler-icons';
+
+ export default {
+ components: { BoldIcon },
+ };
+</script>
+
+<template>
+ <bold-icon />
+</template>
+```
+
+`vue-tabler-icons` exports it's own type declarations for usage with Typescript.
+
+For more usage documentation refer to [the official documentation](https://github.com/alex-oleshkevich/vue-tabler-icons).
+
### CDN
All files included in `@tabler/icons` npm package are available over a CDN.
@@ -127,6 +151,49 @@ To load a specific version replace `latest` with the desired version number.
<script src="https://unpkg.com/@tabler/icons@1.36.0/icons-react/dist/index.umd.js"></script>
```
+### Compiling fonts
+
+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:
+
+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 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"
+}
+```
+To compile the fonts run:
+```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,
+}
+```
+
+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"]
+}
+```
+
### 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)):