This reads binary data from WOFF files in pure Ruby and allows limited modification of metadata.
Add this line to your application's Gemfile:
gem 'woff', '~> 1.1.0'
And then execute:
Or install it yourself as:
$ gem install woff
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.
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 = ::.("/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)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request