All Projects → taggon → fonty

taggon / fonty

Licence: MIT license
A simple library and CLI tool for generating web fonts

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to fonty

Awesome Icons
A curated list of awesome Web Font Icons
Stars: ✭ 758 (+3509.52%)
Mutual labels:  web-fonts
Woff2 Feature Test
A simple feature test for the WOFF2 font format
Stars: ✭ 106 (+404.76%)
Mutual labels:  web-fonts
Woffle
Drag and drop woff and woff2 web font generator for macOS
Stars: ✭ 24 (+14.29%)
Mutual labels:  web-fonts
Web Fonts Generator Service
web font生成器:based on TTFRender, gulp-ttf2woff, and NodeJS. 简化中文字体定制。
Stars: ✭ 25 (+19.05%)
Mutual labels:  web-fonts
Clear Sans Webfont
Webfont conversion of the Clear Sans typeface designed by Intel.
Stars: ✭ 62 (+195.24%)
Mutual labels:  web-fonts
Webfont
Awesome generator of webfont
Stars: ✭ 170 (+709.52%)
Mutual labels:  web-fonts
Fontfaceobserver
Webfont loading. Simple, small, and efficient.
Stars: ✭ 3,948 (+18700%)
Mutual labels:  web-fonts
wh40k-icon
Warhammer 40000 icons.
Stars: ✭ 38 (+80.95%)
Mutual labels:  web-fonts
Faux Pas
A script to highlight elements that are mismatched incorrectly to @​font-face blocks, which may result in shoddy faux bold or faux italic rendering.
Stars: ✭ 93 (+342.86%)
Mutual labels:  web-fonts
Materialdesign Webfont
@mdi/font Dist for Material Design Icons.
Stars: ✭ 253 (+1104.76%)
Mutual labels:  web-fonts
Web Font Loading Recipes
A bunch of demos for different web font loading strategies. Companion to https://www.zachleat.com/web/comprehensive-webfonts/ Read more: https://www.zachleat.com/web/recipes/
Stars: ✭ 964 (+4490.48%)
Mutual labels:  web-fonts
Glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 1,099 (+5133.33%)
Mutual labels:  web-fonts
Powerline Web Fonts
Powerline Web Fonts for Chromebook
Stars: ✭ 178 (+747.62%)
Mutual labels:  web-fonts
Urdu Web Fonts
Urdu fonts converted into web fonts
Stars: ✭ 7 (-66.67%)
Mutual labels:  web-fonts
gatsby-omni-font-loader
Font loader optimized for maximum performance. Removes render-blocking font resources and loads them asynchronusly. Handle FOUT & FOUC with font loading status watcher. Supports both local-hosted fonts and web fonts.
Stars: ✭ 98 (+366.67%)
Mutual labels:  web-fonts
Pokemon Font
GAME BOY font from Pokémon R/G/B/Y/G/S/C, Unicode extended.
Stars: ✭ 437 (+1980.95%)
Mutual labels:  web-fonts
Karmilla
An expanded version of the amazing Karla webfont, adding support for various languages (French, German, Norse, Hungarian, Latvian, Icelandic...)
Stars: ✭ 130 (+519.05%)
Mutual labels:  web-fonts
react-with-async-fonts
🔠 React module for working with custom web fonts
Stars: ✭ 22 (+4.76%)
Mutual labels:  web-fonts
glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 422 (+1909.52%)
Mutual labels:  web-fonts
Hack
A typeface designed for source code
Stars: ✭ 14,543 (+69152.38%)
Mutual labels:  web-fonts

Fonty

A simple library/CLI tool for generating web fonts.

Translations

Prerequisite

  • Node >= 6.0

Usage

const fonty = require('fonty');

fonty( 'path/to/source.ttf', 'path/to/output', options );

If the path/to/output is a directory, it should end with a single forward slash(/).

Options

  • base64: If true, the css option will automatically turn on and the css file will include base64-encoded web fonts.
  • css: If true, fonty will generate css file for the output web fonts.
  • glyph: A string contains the glyphs that the output fonts have. All glyphs are preserved by defalut.
  • optimize: If true, all empty glyphs except for space will be removed.
  • type: An array of output types. Default: ['ttf', 'eot', 'svg', 'woff', 'woff2'].

Note: if the glyph option contains a space, fonty will alias it as both new line and carrage return.

Events

The fonty returns an array of promises and a promise represents each type. See the following code.

fonty( 'path/to/source.ttf', 'path/to/output', options ).map( promise => {
	promise.done( (type) => {
		console.log( `.${type} file has been converted.` );
	} );
} );

The above code write a console message whenever each file conversion completed.

CLI Tool

First, install the tool globally.

$ npm i -g fonty

And just use it:

$ fonty [options] path/to/source.ttf [path/to/output]

Let's say you have a big list of glyphs in glyphs.txt and want to generate eot and woff type webfonts from font.ttf. You can pass the glyph list to fonty like this:

$ GLYPHS=`cat glyphs.txt` fonty --glyph="$GLYPHS" --type="eot,woff" font.ttf

You will see more detail help if you just execute fonty in the command line.

License

This library is released under MIT license.

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