Giter Site home page Giter Site logo

woff's Introduction

WOFF

WOFF is a compressed format for putting fonts on web pages. While browsers can support True Type font files (.ttf suffix), WOFF files are smaller and are compatible with all modern browsers (e.g. Internet Explorer has had WOFF support since IE9 from 2011, Firefox has supported WOFF files since 2009, etc.).

This repo

This is a mirror of http://people.mozilla.org/~jkew/woff/ (which has since fallen off of the Internet) so that the open-source reference code remains available and is not put behind a paywall.

To compile and install, make sure you have the zlib development libraries installed (e.g. in CentOS6 yum -y install zlib-devel as root), then

git clone https://github.com/samboy/WOFF
cd WOFF
make

Then, as root:

cp sfnt2woff /usr/local/bin

Once this is done, to make a webfont, enter the directory with the .ttf file, then run sfnt2woff

sfnt2woff Chortle2014f.ttf

This creates a Chortle2014f.woff webfont file. Replace “Chortle2014f.ttf” with the name of the actual webfont to convert.

http://people.mozilla.org/~jkew/woff/ (site down; archive link) has Windows and MacOS binaries for people who do not wish to install a compiler.

Zopfli compression

Zopfli compression can make WOFF files with a better compression ratio:

https://github.com/bramstein/sfnt2woff-zopfli

WOFF2

Here is the reference code for making WOFF2 files:

https://github.com/google/woff2

Note that this code will not install in CentOS6, but compiles and installs just fine in CentOS7:

git clone --recursive https://github.com/google/woff2.git
cd woff2
make clean all

woff2 font generation is similar:

woff2_compress Chortle2014f.ttf

EOT

Keep in mind that EOT is an obsolete format; any browser which supports EOT but does not support WOFF (Read: Internet Explorer 6-8) is a browser which is unsupported.

That in mind, the best EOT converter for Windows can be downloaded at http://eotfast.com (site down; archive link has files) ; there are a couple of cross platform EOT converters including the one at https://www.w3.org/Tools/eot-utils/

woff's People

Contributors

samboy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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