GithubHelp home page GithubHelp logo

font-min-cut's Introduction

font-min-cut

7000常用汉字精简+特殊字符

使用font-spider提取字符

在index.html中已经包含了7000常用汉字和一些常见字符。 fonts目录下已经准备好了微软雅黑的几个字体文件。 项目当中我们使用MicrosoftYaHeiUILight当常规字体,MicrosoftYaHei当粗体。

  1. 指定要提取的字体文件,修改font-face中的url为所需要提取的字体文件路径。
@font-face {
    src: url('./MicrosoftYaHeiUILight.ttf') format('truetype');
}
  1. ./node_modules/.bin/font-spider index.html,会得到提取之后的字体ttf。

  2. font-sipder提取之后缺少空格,可以使用fontcreator对字体就行编辑,手动添加空格或者从文字的字体文件中copy空格过来。

使用注意: 将字体放在.font-spider目录下。index.html里面的src即使要精简的字库,又是要生成的字库。直接生成到root目录。

安装nodejs环境之后, 执行:

npm install font-spider -g

即可安装font-spider.

执行程序:

font-spider index.html

font-min-cut's People

Contributors

rock-zhang avatar zhaogd233 avatar

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.