Project

woff

0.0
No commit activity in last 3 years
No release in over 3 years
Handles the management and modification of WOFF and WOFF2 formatted files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11.2
~> 3.5

Runtime

~> 2.3
~> 0.1
 Project Readme

WOFF

Gem Version Build Status Code Climate

This reads binary data from WOFF files in pure Ruby and allows limited modification of metadata.

Installation

Add this line to your application's Gemfile:

gem 'woff', '~> 1.1.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install woff

WOFF2 Support

The gem can currently read, but not write to WOFF2 files. Both reading and writing WOFF2 files should be considered in development, with API changes likely.

Usage

Used in generation of WOFF files. Returns the data to be written to a file or sent to the Zip gem of your choice.

woff = WOFF::Builder.new("/Users/Desktop/sample.woff")

# This will set or update the metadata's licensee name to `The Friends` and the
# metadata's license id to `L012356093901`.
data = woff.font_with_licensee_and_id("The Friends", "L012356093901")

File.binwrite("/Users/Desktop/sample-with-metadata.woff", data)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request