0.0.8 • Published 8 months ago

@acymailing/svg-to-woff v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

SVG to woff

Install

npm install @acymailing/svg-to-woff

Generate a new font

The library will generate CSS, Woff and Woff2 files.

To use your new font, you can use the class [fontName]-[icon-name] to display an icon.

You can check the icon-list.html in the output folder to see a list of all the icons.

Using the CLI

If you want to use the cli command you can either install it globally this way:

npm install -g @acymailing/svg-to-woff
generate-icon-font icon "/path/to/icons.zip" "/path/to/output"

Or you can use npx if you install it locally:

npx generate-icon-font icon "/path/to/icons.zip" "/path/to/output"

Using the code API

Use the function generateIconFont(fontName, zipFilePath) to generate a new font from a zip file containing all the icons in SVG format.

import {generateIconFont} from '@acymailing/svg-to-woff';

await generateIconFont('icon', '/path/to/icons.zip', '/path/to/output');

// CSS, Woff, Woff2 files are in the output folder
// You also have the icon-list.html file to see all the icons

Font name examples

  • icon => <i class="icon-trash"></i>
  • my-projet => <i class="my-projet-trash"></i>
  • "this is a test" => <i class="thisisatest-trash"></i>

License

This library is released under the MIT license. You are free to use, modify, and distribute it as you see fit. See the LICENSE file for more information.

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago