cf

chinese-fonts

Convert asian text to web fonts

Showing:

Popularity

Downloads/wk

0

GitHub Stars

14

Maintenance

Last Commit

3yrs ago

Contributors

1

Package

Dependencies

7

Size (min+gzip)

0.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ChineseFonts

You can use this program to convert asian fonts to web fonts, like Chinese, Japanese, Korean.

這是一個可以把字體抽出壓縮成web fonts的程式,適用於中文,日文及韓文。

convert font

Usage

Setting

//setting
const fileDirectory = './';
const fileExtension = 'html';
const fontsSource = './fonts/seto.ttf';
const outputPath = 'build/';
const fontsClass = 'h1';

You can change setting in index.js

package.json

{
  "name": "ChineseFonts",
  "version": "0.0.3",
  "description": "Zip target fonts to web fonts",
  "main": "index.js",
  "dependencies": {
    "fontmin": "latest",
    "fs": "latest",
    "gulp-ttf2woff2": "latest",
    "fast-html-parser": "latest",
    "imagemin": "latest",
    "imagemin-svgo": "latest",
    "readdir": "latest"
  },
  "devtool": {
    "source-map": "latest"
  },
  "scripts": {
    "build": "node index.js"
  },
  "author": "Edmond Yip",
  "license": "MIT"
}

install

$ npm install

Use npm install to install package.

Scripts

$ npm run build
$ > ChineseFonts@0.0.3 build /var/test
$ > node index.js
$ Converted words : 我是超級大標題第二 (9)

You can see which words have been convert after run build.

運行build後會顯示已轉換的字型

Thanks

version

  • v0.0.1 first push
  • v0.0.2 add word counter
  • v0.0.3 check all subdirectory

Remark

This is my first open source in Github, please tell me if you find any questions, Thanks.

這是我Github第一次公開open source,還沒有掌握好重點,如有問題請多多指教。

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100