Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

fonteditor-core

> 开发工具
Open source

fonteditor core functions

383 stars0 likes1 views
WebsiteGitHub

About

fonteditor core functions

fonteditor-core

FontEditor core functions

NPM version Downloads

Feature

Read and write sfnt font like ttf, woff, woff2, eot, svg, otf.

  • sfnt parse
  • read, write, transform fonts
    • ttf (read and write)
    • woff (read and write)
    • woff2 (read and write)
    • eot (read and write)
    • svg (read and write)
    • otf (only read and convert to ttf)
  • ttf glyph adjust
  • svg to glyph
  • ESM compatibility for modern bundlers (Webpack, Rollup, Vite, Next.js, etc.)
  • TypeScript support with type definitions

Usage

…

Modern ES Module Usage

This library supports both CommonJS and ES Modules. For detailed information on using with modern bundlers, please see ESM_USAGE.md.

javascript
// ESM import
import fonteditorCore, { createFont, woff2 } from 'fonteditor-core';

createFont(buffer, options);

woff2

Notice: woff2 use wasm build of google woff2, before read and write woff2, we should first call woff2.init().

javascript
import {createFont, woff2} from 'fonteditor-core';

// in nodejs
woff2.init().then(() => {
    // read woff2
    const font =  createFont(buffer, {
      type: 'woff2'
    });
    // write woff2
    const buffer = font.write({type: 'woff2'});
});

// in browser
woff2.init('/assets/woff2.wasm').then(() => {
    // read woff2
    const font = createFont();
    // write woff2
    const arrayBuffer = font.write({type: 'woff2'});
});

Demo

bash
npm run dev

build

bash
npm run build

test

bash
npm run test

support

Node.js:>= 12.0

Browser: Chrome, Safari

Related

  • fonteditor
  • fontmin
  • fonteditor online

License

MIT © Fonteditor

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptconverteotfonteditorotfread

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具