All Projects → MichealWayne → svgs2fonts

MichealWayne / svgs2fonts

Licence: other
npm-svgs2fonts。svg图标转字体图标库(svgs -> svg,ttf,eot,woff,woff2),nodejs。

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to svgs2fonts

Php Font Lib
A library to read, parse, export and make subsets of different types of font files.
Stars: ✭ 1,530 (+5175.86%)
Mutual labels:  font, woff
fontagon
Fontagon is a great tool that easily converts svg into icon font. Fontagon-cli allows faster conversion to commands.
Stars: ✭ 18 (-37.93%)
Mutual labels:  font, woff
fontfacegen-webpack-plugin
A plugin for webpack that allows you to convert .ttf and .otf files into various other font formats such as .eot, .ttf, .svg, .woff and .woff2 using the existing NPM package fontfacegen.
Stars: ✭ 20 (-31.03%)
Mutual labels:  font, woff
lato-font
Distribution repository for Lato font
Stars: ✭ 36 (+24.14%)
Mutual labels:  font
saint
The official PyTorch implementation of recent paper - SAINT: Improved Neural Networks for Tabular Data via Row Attention and Contrastive Pre-Training
Stars: ✭ 209 (+620.69%)
Mutual labels:  transformer
SIGIR2021 Conure
One Person, One Model, One World: Learning Continual User Representation without Forgetting
Stars: ✭ 23 (-20.69%)
Mutual labels:  transformer
uformer-pytorch
Implementation of Uformer, Attention-based Unet, in Pytorch
Stars: ✭ 54 (+86.21%)
Mutual labels:  transformer
text-generation-transformer
text generation based on transformer
Stars: ✭ 36 (+24.14%)
Mutual labels:  transformer
Swash
Fonts in iOS made safe, expressive, and dynamic.
Stars: ✭ 73 (+151.72%)
Mutual labels:  font
TextPruner
A PyTorch-based model pruning toolkit for pre-trained language models
Stars: ✭ 94 (+224.14%)
Mutual labels:  transformer
anti-DPAntiSpider
解决大众点评的字体反爬
Stars: ✭ 16 (-44.83%)
Mutual labels:  woff
charformer-pytorch
Implementation of the GBST block from the Charformer paper, in Pytorch
Stars: ✭ 74 (+155.17%)
Mutual labels:  transformer
fonts
Web fonts that you probably won't find in a CDN
Stars: ✭ 26 (-10.34%)
Mutual labels:  font
postcss-font-grabber
A postcss plugin, it grabs remote font files and update your CSS, just like that.
Stars: ✭ 26 (-10.34%)
Mutual labels:  font
Swin-Transformer-Tensorflow
Unofficial implementation of "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" (https://arxiv.org/abs/2103.14030)
Stars: ✭ 45 (+55.17%)
Mutual labels:  transformer
hkcs
香港民間字集 Hong Kong Character Set Project (HKCS)
Stars: ✭ 29 (+0%)
Mutual labels:  font
SwinIR
SwinIR: Image Restoration Using Swin Transformer (official repository)
Stars: ✭ 1,260 (+4244.83%)
Mutual labels:  transformer
mactype
Better font rendering for Windows.
Stars: ✭ 7,037 (+24165.52%)
Mutual labels:  font
bert-as-a-service TFX
End-to-end pipeline with TFX to train and deploy a BERT model for sentiment analysis.
Stars: ✭ 32 (+10.34%)
Mutual labels:  transformer
fontster
Font installer for Android.
Stars: ✭ 33 (+13.79%)
Mutual labels:  font

svgs2fonts

svg 图标转字体图标库(svgs -> svg,ttf,eot,woff,woff2)。English readme

版本

1.1.0

安装

1.全局安装

npm i -g svgs2fonts

验证

svgs2fonts -v

2.模块安装

npm i --save svgs2fonts

使用

方式 1——模块引入

const svgs2fonts = require('svgs2fonts');
svgs2fonts.init(options);

其中 options 参数:

  • src:{String},svg 文件目录路径;
  • dir:{String},输出路径;
  • fontName:{String},输出图标/字体名称。可选,默认为"iconfont"
  • startNumber:{Number},unicode 起始数字(需要避开正常 unicode 范围)。可选,默认为10000
  • noDemo:{Boolean},是否需要输出 html Demo 文件。可选,默认为false
  • debug:{Boolean},是否开启 debug 模式以输出更多执行信息。可选,默认为false
  • timeout:{Number},执行超时时间,默认为 60s(60000
demo
const svgs2fonts = require('svgs2fonts');
const join = require('path').join;

svgs2fonts
  .init({
    src: __dirname, // svg path
    dist: join(__dirname, 'dest'), // output path
    fontName: 'myIconfont', // font name
    startNumber: 20000, // unicode start number
    noDemo: true, // no demo html files
    debug: true, // open debug
  })
  .then(() => console.log('task success!'))
  .catch(err => console.log(`task failed(${err})`));

方式 2——控制台

svgs2fonts {{srcpath}} {{distpath}} {{options}}

其中参数:

  • srcpath: svg 源文件路径(相对当前窗口环境),传""时为当前窗口路径;
  • distpath: 导出路径,默认在源文件路径下;
  • options: 配置参数,见下文
example
svgs2fonts svg dist

options 配置参数

-n / --name

图标库的名字(default: "iconfont").

example
svgs2fonts svg dist -n myiconfont

--number

unicode 起始编码(default: 10000).

example
svgs2fonts svg dist --number 50000

--nodemo

不要 demo html(default: false).

example
svgs2fonts svg dist --nodemo

--debug

是否开启 debug 模式(default: false).

example
svgs2fonts svg dist --debug

Author

Micheal Wayne

引导文章-《svg、ttf、woff、woff2 图标的研究及转换(svgs2fonts)》

Build time

2018.08.26

Last modified

2021.12.16: fix IE8 bug;

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].