PHPackages                             teicee/woff-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. teicee/woff-converter

ActiveLibrary[File &amp; Storage](/categories/file-storage)

teicee/woff-converter
=====================

PHP class to convert a WOFF font file into a TTF/OTF font file

3444↓25%PHP

Since Jul 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/teicee/php-woff-converter)[ Packagist](https://packagist.org/packages/teicee/woff-converter)[ RSS](/packages/teicee-woff-converter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-woff-converter
==================

[](#php-woff-converter)

[![Latest Release](https://camo.githubusercontent.com/54685ae3e1a9edf58665229c4685cbea0ea723eeee6d6e365dcb0dd6ce34c4ff/68747470733a2f2f706f7365722e707567782e6f72672f7465696365652f776f66662d636f6e7665727465722f762f737461626c652e706e67)](https://packagist.org/packages/teicee/woff-converter)[![Total Downloads](https://camo.githubusercontent.com/f2f0d6619028368b4c76030550ec714cb82d7b8a5ea156aa459becc7df9aadde/68747470733a2f2f706f7365722e707567782e6f72672f7465696365652f776f66662d636f6e7665727465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/teicee/woff-converter)[![License](https://camo.githubusercontent.com/fdebc92204425c7216fbbc6d4af318ee4ac9ce828a450c1ff8a78542b651dc9f/68747470733a2f2f706f7365722e707567782e6f72672f7465696365652f776f66662d636f6e7665727465722f6c6963656e73652e706e67)](https://packagist.org/packages/teicee/woff-converter)

**PHP class to convert a WOFF font file into a TTF/OTF font file**

Description
-----------

[](#description)

Nowadays, web project are using fonts provided in the WOFF/WOFF2 file format. Sometimes the TTF version also exists but is increasingly no longer the case. However the TTF file format can still be useful, for example with PDF tools.

### Features

[](#features)

- Import webfont in WOFF (Web Open Font Format) file format 1.0 ([W3C specifications](https://www.w3.org/TR/WOFF/))
- Export font data in TTF (TrueType Font) file format ([Apple reference](https://developer.apple.com/fonts/TrueType-Reference-Manual/), [Microsoft specifications](https://docs.microsoft.com/fr-fr/typography/opentype/spec/otff))
- Full PHP library, only one file containing the static utility class is needed

### Requirements

[](#requirements)

PHP version 7.0 or higher

### License

[](#license)

This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read [LICENSE](https://raw.githubusercontent.com/teicee/php-woff-converter/main/LICENSE) for information on the software availability and distribution.

Installation
------------

[](#installation)

This library is available on [Packagist](https://packagist.org/packages/teicee/woff-converter), and installation via [Composer](https://getcomposer.org) is the simplest way to add it into your project.

### Install with composer

[](#install-with-composer)

Just add the package dependency to your `composer.json` file:

```
composer require teicee/woff-converter 1.x-dev
```

Make sure that the autoload file from Composer is loaded.

```
// somewhere early in your project's loading, require the Composer autoloader
// see: http://getcomposer.org/doc/00-intro.md
require 'vendor/autoload.php';
```

### Download and install

[](#download-and-install)

Alternatively, if you're not using Composer, you can [download WoffConverter as a zip file](https://github.com/teicee/php-woff-converter/archive/main.zip), then copy the `src/Woff.php` file into one of the `include_path` directories specified in your PHP configuration.

Or you can also download only the PHP class file, directly from the project repository:

```
curl https://raw.githubusercontent.com/teicee/php-woff-converter/main/src/Woff.php
```

Then you have to load the class file manually in your code:

```
