# TTF/Ruby, first release!

**URL:** <https://www.ruby-forum.com/t/ttf-ruby-first-release/75362>\
**Category:** Ruby\
**Created:** [November 9, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/ttf-ruby-first-release/75362 "2006-11-09T12:06:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathieu\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@Mathieu\_B](https://www.ruby-forum.com/u/Mathieu_B)\
**Post date:** [November 9, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/ttf-ruby-first-release/75362/1 "2006-11-09T12:06:15Z")

</div>

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 😉

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](http://www.mblondel.org/files/ttf-ruby/ttf-ruby-0.1.tar.gz)

---

<div class="post-metadata">

**Author:** ![Mathieu\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@Mathieu\_B](https://www.ruby-forum.com/u/Mathieu_B)\
**Post date:** [November 12, 2006, 3:27am UTC](https://www.ruby-forum.com/t/ttf-ruby-first-release/75362/2 "2006-11-12T03:27:08Z")

</div>

On 11/9/06, Mathieu B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![Mathieu\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@Mathieu\_B](https://www.ruby-forum.com/u/Mathieu_B)\
**Post date:** [November 13, 2006, 4:05am UTC](https://www.ruby-forum.com/t/ttf-ruby-first-release/75362/3 "2006-11-13T04:05:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mathieu\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@Mathieu\_B](https://www.ruby-forum.com/u/Mathieu_B)\
**Post date:** [November 13, 2006, 4:11am UTC](https://www.ruby-forum.com/t/ttf-ruby-first-release/75362/4 "2006-11-13T04:11:52Z")

</div>

On 11/12/06, Mathieu B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
