<commit_before># ChineseFonts
Convert Chinese text to web fonts

# Usage

## Setting

```
//setting
const fileDirectory = './'; //target directory
const fileExtension = 'html'; //file extendion
const fontsSource = './fonts/seto.ttf'; //fonts source (must be .ttf)
const outputPath = 'build/'; //output web fonts directory
const fontsClass = 'h1'; //class need fonts
```
You can change setting in index.js

## package.json
```
{
  "name": "ChineseFonts",
  "version": "0.0.1",
  "description": "Zip target fonts to web fonts",
  "main": "index.js",
  "dependencies": {
    "bluebird": "latest",
    "fontmin": "latest",
    "fs": "latest",
    "gulp-ttf2woff2": "latest",
    "fast-html-parser": "latest",
    "imagemin": "latest",
    "imagemin-svgo": "latest",
    "minimatch": "latest"
  },
  "devtool": {
    "source-map": "latest"
  },
  "scripts": {
    "build": "node index.js"
  },
  "author": "<NAME>",
  "license": "MIT"
}

```

## Scripts
```
npm run build
```
運行`build`後會顯示已轉換的字型

# Thanks

* [Fontmin](https://github.com/ecomfe/fontmin)
* [gulp-ttf2woff2](https://github.com/nfroidure/gulp-ttf2woff2)
* [Fast Html Parse](https://github.com/ashi009/node-fast-html-parser)

# Remark

這是我Github第一次公開open source，還沒有掌握好重點，如有問題請多多指教。<commit_msg>edit Readme.md<commit_after># ChineseFonts
You can use this program to convert asian fonts to web fonts, like Chinese, Japanese, Korean.

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

# Usage

## Setting

```
//setting
const fileDirectory = './'; //target directory
const fileExtension = 'html'; //file extendion
const fontsSource = './fonts/seto.ttf'; //fonts source (must be .ttf)
const outputPath = 'build/'; //output web fonts directory
const fontsClass = 'h1'; //class need fonts
```
You can change setting in index.js

## package.json
```
{
  "name": "ChineseFonts",
  "version": "0.0.1",
  "description": "Zip target fonts to web fonts",
  "main": "index.js",
  "dependencies": {
    "bluebird": "latest",
    "fontmin": "latest",
    "fs": "latest",
    "gulp-ttf2woff2": "latest",
    "fast-html-parser": "latest",
    "imagemin": "latest",
    "imagemin-svgo": "latest",
    "minimatch": "latest"
  },
  "devtool": {
    "source-map": "latest"
  },
  "scripts": {
    "build": "node index.js"
  },
  "author": "<NAME>",
  "license": "MIT"
}

```
```
$ npm install
```
Use `npm install` to install package.

## Scripts
```
$ npm run build
```
You can see which words have been convert after run `build`

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

# Thanks

* [Fontmin](https://github.com/ecomfe/fontmin)
* [gulp-ttf2woff2](https://github.com/nfroidure/gulp-ttf2woff2)
* [Fast Html Parse](https://github.com/ashi009/node-fast-html-parser)

# Remark

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

這是我Github第一次公開open source，還沒有掌握好重點，如有問題請多多指教。
{'fraction_non_alphanumeric': 0.17955997161107168, 'fraction_numerical': 0.009226401703335699, 'mean_word_length': 3.919720767888307, 'pattern_counts': {'":': 38, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5225519', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1097, 'n_words': 254}