TTF/Ruby, first release!

I am pleased to announce the first release (version 0.1) of TTF/Ruby,
under the terms of the GNU GPL.

TTF/Ruby is a pure Ruby library to read and write TrueType fonts.

Tables supported are :

  • Cmap *
  • Cvt *
  • Fpgm *
  • Gasp
  • Glyf
  • Head
  • Hhea
  • Hmtx
  • Kern *
  • OS/2
  • Post *
  • Prep *
  • Vhea
  • Vmtx

(Tables marked with an * are only partially supported)

API documentation is written directly in the source code and may be
generated with the following command-line:

$ rdoc -main “Font::TTF::File”

As you noticed, this release is marked 0.1 so do not expect API
compatibility for the next releases.

The tarball also ships some useful tools (and proofs of concept) based
on TTF/Ruby.

ttfdump: a command-line tool to extract informations about a font.

ttfsubset: a tool which from a font and an input file generates a
subset from this font containing only characters in the input file.
Maybe useful to embed a lighter version of a font in a document or in
an embedded system.

ttfcairoglyphviewer: renders a selected glyph using Ruby/GTK, Rcairo
and TTF/Ruby. It also displays markers for corner points, curve control
points, and implicit points.

ttfglyph2svg: prints to stdout a selected glyph in SVG format.

Comments are of course welcome. And there is a large TODO list for the
braves :wink:

I would like to thank Evermore Software, China, where I am currently an
intern, for giving me the permission to release this project (which
started as a prototype for a Java program).

Download: http://www.mblondel.org/files/ttf-ruby/ttf-ruby-0.1.tar.gz

On 11/9/06, Mathieu B. [email protected] wrote:

I am pleased to announce the first release (version 0.1) of TTF/Ruby,
under the terms of the GNU GPL.

TTF/Ruby is a pure Ruby library to read and write TrueType fonts.

Hi, Mathieu. This looks great. I was wondering if it might be possible
to convince your employers to relicense this under Ruby’s licence,
though. The reason I suggest this is that it will ultimately be more
compatible with a larger group of Ruby programs. I would like to be
able to provide hooks to this library in PDF::Writer, but I don’t feel
comfortable doing so under just the GNU GPL.

-austin

Austin Z. wrote:

Hi, Mathieu. This looks great. I was wondering if it might be possible
to convince your employers to relicense this under Ruby’s licence,
though. The reason I suggest this is that it will ultimately be more
compatible with a larger group of Ruby programs. I would like to be
able to provide hooks to this library in PDF::Writer, but I don’t feel
comfortable doing so under just the GNU GPL.

Hi, Austin. It was agreed that from now on I own the copyright of this
project since the company will never use it itself. So the licence is
not an issue. I will use double licencing like Ruby. How do you plan to
use it in PDF::Writer?

Mathieu

On 11/12/06, Mathieu B. [email protected] wrote:

use it in PDF::Writer?
I probably won’t be using it for about six months or so (non-open
source projects have to take precedence for right now), but one of the
things that’s problematic about PDF::Writer is that to use True Type
fonts, you must have a font metrics file (.afm) usually generated by
ttf2afm or something like that. So asking you to make it so that such
an .afm could be generated by TTFRuby would be a very good first step.
Ultimately, once I’m certain of exactly what data structure I need, I
may ask you to make it so that I can call TTFRuby (if installed) to
get the font metrics information for laying out the text using a
TrueType (and hopefully OpenType) font.

It’s not quite where you are yet, but I’m as impressed for this
because it was something I knew I’d have to tackle in the end.

PDF::Writer is (and will remain) MIT-licensed, but I feel more
comfortable with the Ruby dual-licensing on software that I will be
using as a client ultimately.

-austin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs