Code Monkey home page Code Monkey logo

chinesefonts's Introduction

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
$ > [email protected] 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,還沒有掌握好重點,如有問題請多多指教。

chinesefonts's People

Contributors

edmondyip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

zermylf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.