{"_id":"@darthsoup/webfonts-generator","_rev":"2-46c5f8104e5453d642f4e792e639c77f","name":"@darthsoup/webfonts-generator","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.0":{"name":"@darthsoup/webfonts-generator","version":"0.5.0","description":"Generator of webfonts from svg icons","main":"src/index.js","directories":{"test":"tests"},"scripts":{"test":"mocha tests"},"repository":{"type":"git","url":"git+https://github.com/darthsoup/webfonts-generator.git"},"keywords":["font","webfont","svg","ttf","woff","woff2"],"author":{"name":"sunflowerdeath"},"license":"Unlicense","bugs":{"url":"https://github.com/darthsoup/webfonts-generator/issues"},"dependencies":{"handlebars":"^4.0.11","mkdirp":"^0.5.0","lodash":"^4.17.10","q":"^1.1.2","svg2ttf":"^4.1.0","svgicons2svgfont":"^9.0.0","ttf2eot":"^2.0.0","ttf2woff":"^2.0.1","ttf2woff2":"^2.0.3","url-join":"^4.0.0"},"devDependencies":{"file-type":"^9.0.0","mocha":"^5.2.0","node-sass":"^4.9.3","read-chunk":"^2.1.0"},"gitHead":"7f36b5c193a3f4a171d688db97fa8ac5a5188151","homepage":"https://github.com/darthsoup/webfonts-generator#readme","_id":"@darthsoup/webfonts-generator@0.5.0","_npmVersion":"6.2.0","_nodeVersion":"8.11.3","_npmUser":{"name":"darthsoup","email":"darthsoup@mailbox.org"},"dist":{"integrity":"sha512-N298a/4K+z4vreQ8rWGf6LvH6SgTbGyiBi+G5Nd4/9OHH27zsB1m8NrPdcwxnJfhtuQA4eUXa0iZUJiHePwH2w==","shasum":"a847ccd25f104e3e4938e2ec98465766e4b0b53a","tarball":"https://registry.npmjs.org/@darthsoup/webfonts-generator/-/webfonts-generator-0.5.0.tgz","fileCount":22,"unpackedSize":34621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcsBFCRA9TVsSAnZWagAAVWgP/3TwK4i4okR/Mv5yNmn6\ncF7Nyk98Y4TBOCAFn8lf4KoV/wWcyvyp3g/PLURtQX5/LytG0Gfl0wHcci8B\nz1z6+1ReQ6aZBWs6/NHjw6orn7kjzN/Q3SDaj+CwXQ3x4dRhR8OJBbuFdYDb\nyeGRNDf86M6RavBycq7XqObBx0Mqu3J970xIkiDaH+fFOzZQqHp0KpjRU/+L\nqeieodOFudlCC9bmW+W/08iQJ2s7mpiB0hTWEskPNZeJvKF4xTEm/WVlVCAz\n9zSarJ9RfqVE5eDnUkOtCiDrBvHqO+1MtejVp5p7yymneB0mAzfdSePawfYW\nnKYu7FU51NI74ys9LO0CYdXBSFOxa3iG1IWPIGRyX6cM09EFqbU0e9/3ZXKm\njNNHUkFpE/fOBO4VkpCI0mOb59UecnN6p+1otdP2yZpu4GPQUlX/Jw6jRQ6S\nl3LOjv20b0MSkxDxOwHVNSuefLGZklEmTDmiHN5OqvVXk+hBBKfnHWCVKaqF\n8Z4ZFWX8eAgB2jlleAp7j4IZlf/PJqOnrijkXXOZRQMBtXgisEmaQOMqFmAQ\nQpVY13vu4ct3yX723ucAFmtHgpCis/xPQn861wJjqTBO3bqCJf+cc9UmXaqX\nhV4iwwYaMB0bcV94NQ6qa5xH5JBXP94Ej6C940YkuSVicbW2Xv6rPFk16Dws\n2OZl\r\n=n1Ml\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfkiyT1NUd3zdmHZHIwDZVUhb5bYObd6LUBVdhnu4crAiBQ3022A/Y6D8vERO2m2w8XCULKSbrwMNDKC7Uv/Vn/ZQ=="}]},"maintainers":[{"name":"darthsoup","email":"darthsoup@mailbox.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webfonts-generator_0.5.0_1534246980929_0.5693197640187702"},"_hasShrinkwrap":false},"0.5.1":{"name":"@darthsoup/webfonts-generator","version":"0.5.1","description":"Generator of webfonts from svg icons","main":"src/index.js","directories":{"test":"tests"},"scripts":{"test":"mocha tests"},"repository":{"type":"git","url":"git+https://github.com/darthsoup/webfonts-generator.git"},"keywords":["font","webfont","svg","ttf","woff","woff2"],"author":{"name":"sunflowerdeath"},"license":"Unlicense","bugs":{"url":"https://github.com/darthsoup/webfonts-generator/issues"},"dependencies":{"handlebars":"^4.0.11","mkdirp":"^0.5.0","lodash":"^4.17.10","q":"^1.1.2","svg2ttf":"^4.1.0","svgicons2svgfont":"^9.0.0","ttf2eot":"^2.0.0","ttf2woff":"^2.0.1","ttf2woff2":"^2.0.3","url-join":"^4.0.0"},"devDependencies":{"file-type":"^10.9.0","mocha":"^6.0.2","node-sass":"^4.9.3","read-chunk":"^3.1.0"},"gitHead":"ba9f8781cd15e9bc5832499d96fdc6b873075513","homepage":"https://github.com/darthsoup/webfonts-generator#readme","_id":"@darthsoup/webfonts-generator@0.5.1","_npmVersion":"6.4.1","_nodeVersion":"8.15.1","_npmUser":{"name":"darthsoup","email":"darthsoup@mailbox.org"},"dist":{"integrity":"sha512-XEwX8+xik29DpFZxct4Tmaw1pZdmQJWwAo2X8UJ3LpUBMjxo2Re5vBtjAFYY81xiqk/cX9BOPCv9Hm+F7Ec4Sg==","shasum":"4096f48028ecfcfb143e87e34fe060f6f317d6f8","tarball":"https://registry.npmjs.org/@darthsoup/webfonts-generator/-/webfonts-generator-0.5.1.tgz","fileCount":22,"unpackedSize":34751,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgmS5CRA9TVsSAnZWagAAzTIP+gN/YQqYEcOoFpSMRTq4\nritTj83akuT1pKYnbjmJonx4BNw0BxzhhnV0MetC9rPPvhVPLV6nC2ZSHFB8\nJYuKv2RvNzufGhSCIxhRPXK0qE3QviCkFuS+mLSJrW9vtPw3+MQ9FPijhcHy\nXSjqWfzQfHDQumW5+x6Z3ThHUpLuS4TdMS6bIRBLoyLJo7B5WCBUhl5ydoj3\nyPRwFcKbQva7yoDFa52xxwEJNVTcbV7XHlOZ6KVioF/MXv72rLyzPQzgYtst\nDW1rlM97wmlYMMH6ipYiIQOvmolvi/2YGLOEMsjOdwEJQmcsrA08zanVyoij\nwEDzmh8aGOUmWv60OK4xK9JCltgiFDvmVa1aUIfpUVHhU0Xox+tXnfBRc/0G\n3voafqijRmDPP5voyQpSOr2DpEBVUH0tmWtqxNmkkvEyMUlpkMoIcQSQlIKv\nwGBs1LeG1AD2LcF9NPRrlOsi0+Rxbyt0ZxuEyLL8Nyg6SjFv5mDl5rTgstOj\neLFYIVIrUv6pRIM3SONq6TGJswfE7WCvFaUKC22d0w1J0cu5lc6DabHzfqZK\niKyYQ8nxTV7rmh61lJFGrsnLwM3B452/6+JvwznBffCM2vn0xHZnT9G3YqwK\nNkktz9LyhUJ5ejFPFHRP0HIh1gw7nvcIGzVbQ7NoY+V/aUdxLXFrf+8W4k1N\nyWxF\r\n=oTc3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGQFHadU6VrBiWq6DXRQI+TnY0q4S1Mj756pjQyt9y0DAiEAmZis1aotp6+W4THzwYxksOWo9l7v7ic5CY2C797ofaA="}]},"maintainers":[{"name":"darthsoup","email":"darthsoup@mailbox.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webfonts-generator_0.5.1_1552049336513_0.108028731448363"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-14T11:43:00.681Z","0.5.0":"2018-08-14T11:43:00.997Z","modified":"2022-04-05T02:46:09.353Z","0.5.1":"2019-03-08T12:48:56.700Z"},"maintainers":[{"name":"darthsoup","email":"darthsoup@mailbox.org"}],"description":"Generator of webfonts from svg icons","homepage":"https://github.com/darthsoup/webfonts-generator#readme","keywords":["font","webfont","svg","ttf","woff","woff2"],"repository":{"type":"git","url":"git+https://github.com/darthsoup/webfonts-generator.git"},"author":{"name":"sunflowerdeath"},"bugs":{"url":"https://github.com/darthsoup/webfonts-generator/issues"},"license":"Unlicense","readme":"# webfonts-generator\n\n\n[![Build Status](https://travis-ci.org/darthsoup/webfonts-generator.svg?branch=master)](https://travis-ci.org/darthsoup/webfonts-generator) [![Greenkeeper badge](https://badges.greenkeeper.io/darthsoup/webfonts-generator.svg)](https://greenkeeper.io/)\n\nGenerator of webfonts from SVG icons.\n\nFeatures:\n\n* Supported font formats: WOFF2, WOFF, EOT, TTF and SVG.\n* Supported browsers: IE8+.\n* Generates CSS files and HTML preview, allows to use custom templates.\n\n## Install\n\n```\nnpm install --save-dev webfonts-generator\n# or\nyarn add --dev webfonts-generator\n```\n\n## Usage\n\n```js\nconst webfontsGenerator = require('webfonts-generator');\n\nwebfontsGenerator({\n  files: [\n    'src/dropdown.svg',\n    'src/close.svg',\n  ],\n  dest: 'dest/',\n}, function(error) {\n  if (error) {\n    console.log('Fail!', error);\n  } else {\n    console.log('Done!');\n  }\n})\n```\n\n## webfontsGenerator(options, done)\n\n### options\n\nType: `object`\n\nObject with options. See the list of options.\n\n### done\n\nType: `function(error, result)`\n\n## List of options\n\n### files\n\n*required*\n\nType: `array.<string>`\n\nList of SVG files.\n\n### dest\n\n*required*\n\nType: `string`\n\nDirectory for generated font files.\n\n### fontName\n\nType: `string`\n<br>\nDefault: `'iconfont'`\n\nName of font and base name of font files.\n\n### css\n\nType: `boolean`\n<br>\nDefault: `true`\n\nWhether to generate CSS file.\n\n### cssDest\n\nType: `string`\n<br>\nDefault: `path.join(options.dest, options.fontName + '.css')`\n\nPath for generated CSS file.\n\n### cssTemplate\n\nType: `string`\n<br>\nDefault: path of default CSS template\n\nPath of custom CSS template.\nGenerator uses handlebars templates.\n\nTemplate receives options from `options.templateOptions` along with the following options:\n\n* fontName\n* src `string` &ndash; Value of the `src` property for `@font-face`.\n* codepoints `object` &ndash; Codepoints of icons in hex format.\n\nPaths of default templates are stored in the `webfontsGenerator.templates` object.\n\n* `webfontsGenerator.templates.css` &ndash; Default CSS template path.\n\t<br>\n\tIt generates classes with names based on values from `options.templateOptions`.\n\n* `webfontsGenerator.templates.scss` &ndash; Default SCSS template path.\n\t<br>\n\tIt generates mixin `webfont-icon` to add icon styles.\n\t<br>\n\tIt is safe to use multiple generated files with mixins together.\n\t<br>\n\tExample of use:\n\n\t```\n\t@import 'iconfont';\n\t.icon { @include webfont-icon('icon'); }\n\t```\n\n### cssFontsPath\n\nType: `string`\n<br>\nDefault: `options.destCss`\n\nFonts path used in CSS file.\n\n### html\n\nType: `boolean`\n<br>\nDefault: `false`\n\nWhether to generate HTML preview.\n\n### htmlDest\n\nType: `string`\n<br>\nDefault: `path.join(options.dest, options.fontName + '.html')`\n\nPath for generated HTML file.\n\n### htmlTemplate\n\nType: `string`\n<br>\nDefault: `templates/html.hbs`\n\nHTML template path.\nGenerator uses handlebars templates.\n\nTemplate receives options from `options.templateOptions` along with the following options:\n\n* fontName\n* styles `string` &ndash; Styles generated with default CSS template.\n\t(`cssFontsPath` is chaged to relative path from `htmlDest` to `dest`)\n* names `array.<string>` &ndash; Names of icons.\n\n### templateOptions\n\nType: `object`\n\nAdditional options for CSS & HTML templates, that extends default options.\n\nDefault options are:\n```js\n{\n\tclassPrefix: 'icon-',\n\tbaseSelector: '.icon'\n}\n```\n\n### types\n\nType: `array<string>`\n<br>\nDefault: `['woff2', 'woff', 'eot']`\n\nFont file types to generate.\nPossible values: `svg, ttf, woff, woff2, eot`.\n\n### order\n\nType: `array<string>`\n<br>\nDefault: `['eot', 'woff2', 'woff', 'ttf', 'svg']`\n\nOrder of `src` values in `font-face` in CSS file.\n\n### rename\n\nType: `function(string) -> string`\n<br>\nDefault: basename of file\n\nFunction that takes path of file and return name of icon.\n\n### startCodepoint\n\nType: `number`\n<br>\nDefault: `0xF101`\n\nStarting codepoint. Defaults to beginning of unicode private area.\n\n### codepoints\n\nType: `object`\n\nSpecific codepoints for certain icons.\nIcons without codepoints will have codepoints incremented from `startCodepoint` skipping duplicates.\n\n### fontName, normalize, fontHeight, round, descent\n\nOptions that are passed directly to\n[svgicons2svgfont](https://github.com/nfroidure/svgicons2svgfont).\n\n### formatOptions\n\nType: `object`\n\nSpecific per format arbitrary options to pass to the generator\n\nformat and matching generator:\n- `svg` - [svgicons2svgfont](https://github.com/nfroidure/svgicons2svgfont).\n- `ttf` - [svg2ttf](https://github.com/fontello/svg2ttf).\n- `woff2` - [ttf2woff2](https://github.com/nfroidure/ttf2woff2).\n- `woff` - [ttf2woff](https://github.com/fontello/ttf2woff).\n- `eot` - [ttf2eot](https://github.com/fontello/ttf2eot).\n\n```js\nwebfontsGenerator({\n  // options\n  formatOptions: {\n  \t// options to pass specifically to the ttf generator\n  \tttf: {\n  \t\tts: 1451512800000\n  \t}\n  }\n}, function(error, result) {})\n```\n\n### writeFiles\n\nType: `boolean`\n<br>\nDefault: `true`\n\nIt is possible to not create files and get generated fonts in object\n to write them to files later.\n<br>\nAlso results object will have function `generateCss([urls])`\nwhere `urls` is an object with future fonts urls.\n\n```js\nwebfontsGenerator({\n  // options\n  writeFiles: false\n}, function(error, result) {\n  // result.eot, result.ttf, etc - generated fonts\n  // result.generateCss(urls) - function to generate css\n})\n```\n\n## License\n\nPublic domain, see the `LICENCE` file.\n","readmeFilename":"README.md"}