All Projects → 2234839 → Web Font

2234839 / Web Font

字体裁剪工具

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Web Font

Birdfont
A font editor for creating fonts in TTF, EOT, SVG and BIRDFONT format.
Stars: ✭ 272 (+33.99%)
Mutual labels:  ttf
Web Fonts Generator Service
web font生成器:based on TTFRender, gulp-ttf2woff, and NodeJS. 简化中文字体定制。
Stars: ✭ 25 (-87.68%)
Mutual labels:  ttf
Haack
Hæck
Stars: ✭ 142 (-30.05%)
Mutual labels:  ttf
Last Resort Font
Last Resort Font
Stars: ✭ 462 (+127.59%)
Mutual labels:  ttf
Swifticons
🎢Swift Library for Font Icons - ★ this library
Stars: ✭ 747 (+267.98%)
Mutual labels:  ttf
Mybox
Easy tools of document, image, file, network, location, color, and media.
Stars: ✭ 45 (-77.83%)
Mutual labels:  ttf
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 (-90.15%)
Mutual labels:  ttf
Webfont Generator
Locally convert fonts to web formats and generate CSS rules
Stars: ✭ 153 (-24.63%)
Mutual labels:  ttf
Zpix Pixel Font
Zpix (最像素) is a pixel font supporting English, Traditional Chinese, Simplified Chinese and Japanese.
Stars: ✭ 916 (+351.23%)
Mutual labels:  ttf
Ttfunk
Font Metrics Parser for Prawn
Stars: ✭ 108 (-46.8%)
Mutual labels:  ttf
Font Spider
Smart webfont compression and format conversion tool
Stars: ✭ 4,550 (+2141.38%)
Mutual labels:  ttf
Codeface
Typefaces for source code beautification
Stars: ✭ 5,612 (+2664.53%)
Mutual labels:  ttf
Mikhak
simple monoline Arabic-Latin semi handwriting typeface
Stars: ✭ 64 (-68.47%)
Mutual labels:  ttf
Crimson
The Crimson Text typeface
Stars: ✭ 439 (+116.26%)
Mutual labels:  ttf
Svgtofont
Read a set of SVG icons and ouput a TTF/EOT/WOFF/WOFF2/SVG font.
Stars: ✭ 149 (-26.6%)
Mutual labels:  ttf
pixel font
All-in-one tool for creating TrueType outline fonts from bitmap glyph data, purely written in Elixir.
Stars: ✭ 16 (-92.12%)
Mutual labels:  ttf
Awesome Typography
✏︎ Curated list about digital typography 🔥
Stars: ✭ 947 (+366.5%)
Mutual labels:  ttf
Webfont
Awesome generator of webfont
Stars: ✭ 170 (-16.26%)
Mutual labels:  ttf
Webfonts Loader
Make an icon font from SVGs!
Stars: ✭ 153 (-24.63%)
Mutual labels:  ttf
Php Font Lib
A library to read, parse, export and make subsets of different types of font files.
Stars: ✭ 1,530 (+653.69%)
Mutual labels:  ttf

web font 字体裁剪工具

起因

ui 需要展现一些特定的字体,但直接引入字体包又过大,于是想到了裁剪字体,一开始想的使用「字蛛」但他是针对静态网站的,而且实际他会多出许多英文的,估计是直接将源码中存在的文字都算进去了。 后来又找到阿里的「webfont」 但他的字体有限,项目又不开源,所以自己写了这个

尝试

web font 在线站点 web font serverless 版在线尝试地址

请注意,由于这个服务器比较差,所以访问可能比较慢,且因为服务器空间问题我会不定时的清空生成的资源,所以请不要使用这个站点生成的在线资源,如有需要应当自行布设

目的与功能

1.裁剪字体包使其仅包含选中的字体

例如 如下图生成的字体包仅包含 「天地无极乾坤借法」 界面预览

<video src="./doc_img/功能演示.mkv" controls="controls" width:100% height:auto>

其体积自然十分之小

体积展示

2.另外可以生成 css 直接复制可用,部署在公网便可永久访问

例如

@font-face {
    font-family: "QIJIC";
    src: url("http://127.0.0.1:3000/asset/font/1584680576469/令东齐伋复刻体.eot"); /* IE9 */
    src: url("http://127.0.0.1:3000/asset/font/1584680576469/令东齐伋复刻体.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
    url("http://127.0.0.1:3000/asset/font/1584680576469/令东齐伋复刻体.woff") format("woff"), /* chrome, firefox */
    url("http://127.0.0.1:3000/asset/font/1584680576469/令东齐伋复刻体.ttf") format("truetype"), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
    url("http://127.0.0.1:3000/asset/font/1584680576469/令东齐伋复刻体.svg#QIJIC") format("svg"); /* iOS 4.1- */
    font-style: normal;
    font-weight: normal;
}

3.将 ttf 的字体包放置在 ./asset/font_src/ 目录下自然可以检测到新的可用字体,无需重启服务

路径预览

4.提供 zip 的整体下载方案

下载展示

提供的服务

查询可用字体列表

font_list

生成压缩字体包

fontmin

如图可见每个返回的字体资源,访问即可下载。另外在访问该目录下的 asset.zip 可以直接下载全部的文件,生成的资源目录结构见下图

fontmin

注意,此接口是还支持 post 方式访问的,这样可以一次请求多个类型的字体文件,而且不会如同 get 方法那样有长度限制

生成的资源.jpg

动态生成字体

generate_fonts_dynamically

请注意

只支持生成 .ttf .eot .woff .svg 这几种格式

写项目时遇到的问题

  1. 使用 svelte https://github.com/DeMoorJasper/parcel-plugin-svelte 通过这个插件使用 parcel 然后报 new 的错 需要限制 编译的版本,在package.json browserslist 字段限制一下版本就好

  2. parcel 对 post purgecss 支持好像有问题,需要修改 postcss.config.js 文件他才能正确的删除样式

启动

npm i
npm run build
npm run start

默认的访问地址是 http://127.0.0.1:3000

鸣谢

字体天下

fontmin

License

MIT © 崮生

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].