Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ttf2woff

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ttf2woff

Convert TTF font to WOFF

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
185K
decreased by-18.92%
Maintainers
1
Weekly downloads
 
Created

What is ttf2woff?

The ttf2woff npm package is a tool for converting TrueType fonts (TTF) to Web Open Font Format (WOFF). This is particularly useful for web developers who need to optimize font loading and ensure compatibility across different browsers.

What are ttf2woff's main functionalities?

Convert TTF to WOFF

This feature allows you to convert a TTF file to a WOFF file. The code reads a TTF file from the filesystem, converts it to WOFF format, and then writes the WOFF file back to the filesystem.

const ttf2woff = require('ttf2woff');
const fs = require('fs');

const ttf = fs.readFileSync('path/to/font.ttf');
const woff = ttf2woff(ttf);
fs.writeFileSync('path/to/font.woff', Buffer.from(woff.buffer));

Other packages similar to ttf2woff

Keywords

FAQs

Package last updated on 29 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc